Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
A
Avatar Handler Re
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
MyCard
Avatar Handler Re
Commits
ebbbadba
Commit
ebbbadba
authored
Jul 07, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename api
parent
c79e2fc0
Pipeline
#14453
passed with stages
in 29 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
src/app.controller.ts
src/app.controller.ts
+1
-1
src/main.ts
src/main.ts
+1
-0
No files found.
src/app.controller.ts
View file @
ebbbadba
...
@@ -14,7 +14,7 @@ import { BlankReturnMessageDto } from './dto/ReturnMessage.dto';
...
@@ -14,7 +14,7 @@ import { BlankReturnMessageDto } from './dto/ReturnMessage.dto';
export
class
AppController
{
export
class
AppController
{
constructor
(
private
readonly
appService
:
AppService
)
{}
constructor
(
private
readonly
appService
:
AppService
)
{}
@
Get
(
'
user_avatar/ygobbs.com
/:username/:size/:filename.png
'
)
@
Get
(
'
avatar
/:username/:size/:filename.png
'
)
@
Header
(
'
Cache-Control
'
,
'
public, max-age=600
'
)
@
Header
(
'
Cache-Control
'
,
'
public, max-age=600
'
)
// @Header('Content-Type', 'image/png')
// @Header('Content-Type', 'image/png')
@
ApiOperation
({
summary
:
'
获取裁剪后的用户头像
'
})
@
ApiOperation
({
summary
:
'
获取裁剪后的用户头像
'
})
...
...
src/main.ts
View file @
ebbbadba
...
@@ -7,6 +7,7 @@ async function bootstrap() {
...
@@ -7,6 +7,7 @@ async function bootstrap() {
const
app
=
await
NestFactory
.
create
<
NestExpressApplication
>
(
AppModule
);
const
app
=
await
NestFactory
.
create
<
NestExpressApplication
>
(
AppModule
);
app
.
enableCors
();
app
.
enableCors
();
app
.
set
(
'
trust proxy
'
,
[
'
172.16.0.0/12
'
,
'
loopback
'
]);
app
.
set
(
'
trust proxy
'
,
[
'
172.16.0.0/12
'
,
'
loopback
'
]);
app
.
setGlobalPrefix
(
'
api
'
);
const
documentConfig
=
new
DocumentBuilder
()
const
documentConfig
=
new
DocumentBuilder
()
.
setTitle
(
'
app
'
)
.
setTitle
(
'
app
'
)
...
...
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