Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
W
Wenyuanwall Fetch
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Wenyuanwall Fetch
Commits
f9f67a78
Commit
f9f67a78
authored
Jul 14, 2022
by
nanahira
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add cache control header
parent
ddce805c
Pipeline
#14539
passed with stages
in 41 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
src/blacklist/blacklist.controller.ts
src/blacklist/blacklist.controller.ts
+5
-1
No files found.
src/blacklist/blacklist.controller.ts
View file @
f9f67a78
import
{
Controller
,
Get
,
Query
}
from
'
@nestjs/common
'
;
import
{
Controller
,
Get
,
Header
,
Query
}
from
'
@nestjs/common
'
;
import
{
BlacklistService
}
from
'
./blacklist.service
'
;
import
{
ApiOkResponse
,
ApiOperation
,
ApiQuery
}
from
'
@nestjs/swagger
'
;
import
{
...
...
@@ -17,6 +17,10 @@ export class BlacklistController {
@
ApiOperation
({
summary
:
'
获取黑名单
'
})
@
ApiQuery
({
name
:
'
since
'
,
description
:
'
获取黑名单的起始时间
'
})
@
ApiOkResponse
({
type
:
HamiResultDto
})
@
Header
(
'
Cache-Control
'
,
'
public, max-age=600, stale-while-revalidate=600, stale-if-error=604800
'
,
)
async
getBlacklist
(@
Query
(
'
since
'
)
since
:
string
)
{
if
(
!
since
)
{
throw
new
BlankReturnMessageDto
(
400
,
'
since is required
'
);
...
...
nanahira
@nanahira
mentioned in commit
940e4b01
·
Jul 14, 2022
mentioned in commit
940e4b01
mentioned in commit 940e4b01f9b5dceccc9b2e24d203fccf7f65edd0
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment