Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
console
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
console
Commits
c99e4b7b
Commit
c99e4b7b
authored
Aug 02, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix openapi things
parent
ac2b9f65
Pipeline
#15212
passed with stages
in 2 minutes and 7 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
11 deletions
+34
-11
console-api/.eslintignore
console-api/.eslintignore
+4
-0
console-api/.eslintrc.js
console-api/.eslintrc.js
+24
-0
console-api/src/admin/admin.controller.ts
console-api/src/admin/admin.controller.ts
+4
-4
console-api/src/app.controller.ts
console-api/src/app.controller.ts
+0
-2
console-api/src/update/update.controller.ts
console-api/src/update/update.controller.ts
+2
-5
No files found.
console-api/.eslintignore
0 → 100644
View file @
c99e4b7b
webpack.config.js
dist/*
build/*
*.js
console-api/.eslintrc.js
0 → 100644
View file @
c99e4b7b
module
.
exports
=
{
parser
:
'
@typescript-eslint/parser
'
,
parserOptions
:
{
project
:
'
tsconfig.json
'
,
sourceType
:
'
module
'
,
},
plugins
:
[
'
@typescript-eslint/eslint-plugin
'
],
extends
:
[
'
plugin:@typescript-eslint/recommended
'
,
'
plugin:prettier/recommended
'
,
],
root
:
true
,
env
:
{
node
:
true
,
jest
:
true
,
},
ignorePatterns
:
[
'
.eslintrc.js
'
],
rules
:
{
'
@typescript-eslint/interface-name-prefix
'
:
'
off
'
,
'
@typescript-eslint/explicit-function-return-type
'
:
'
off
'
,
'
@typescript-eslint/explicit-module-boundary-types
'
:
'
off
'
,
'
@typescript-eslint/no-explicit-any
'
:
'
off
'
,
},
};
console-api/src/admin/admin.controller.ts
View file @
c99e4b7b
...
...
@@ -64,28 +64,28 @@ export class AdminController {
@
Post
(
'
app/:id/assign
'
)
@
ApiOperation
({
summary
:
'
设置 app 管理者
'
})
@
Api
Ok
Response
({
type
:
BlankReturnMessageDto
})
@
Api
Created
Response
({
type
:
BlankReturnMessageDto
})
async
assignApp
(@
Param
(
'
id
'
)
id
:
string
,
@
Body
(
new
ValidationPipe
({
transform
:
true
}))
assignAppData
:
AssignAppDto
)
{
return
this
.
appService
.
assignApp
(
id
,
assignAppData
.
author
);
}
@
Post
(
'
app/:id/prefix
'
)
@
ApiOperation
({
summary
:
'
设置 app 打包前缀
'
})
@
Api
Ok
Response
({
type
:
BlankReturnMessageDto
})
@
Api
Created
Response
({
type
:
BlankReturnMessageDto
})
async
setAppPrefix
(@
Param
(
'
id
'
)
id
:
string
,
@
Body
(
new
ValidationPipe
({
transform
:
true
}))
appPrefix
:
AppPrefixDto
)
{
return
this
.
appService
.
setAppPrefix
(
id
,
appPrefix
.
_prefix
);
}
@
Post
(
'
purge
'
)
@
ApiOperation
({
summary
:
'
清理没有用的 app 包
'
})
@
Api
Ok
Response
({
type
:
BlankReturnMessageDto
})
@
Api
Created
Response
({
type
:
BlankReturnMessageDto
})
async
purgeOldArchives
()
{
return
new
ReturnMessageDto
(
201
,
'
success
'
,
await
this
.
appService
.
purgeOldArchives
());
}
@
Post
(
'
mirror
'
)
@
ApiOperation
({
summary
:
'
触发镜像
'
})
@
Api
Ok
Response
({
type
:
BlankReturnMessageDto
})
@
Api
Created
Response
({
type
:
BlankReturnMessageDto
})
async
triggerMirror
()
{
this
.
mirrorService
.
triggerMirror
();
return
new
ReturnMessageDto
(
201
,
'
success
'
);
...
...
console-api/src/app.controller.ts
View file @
c99e4b7b
...
...
@@ -83,7 +83,6 @@ export class AppController {
})
@
ApiParam
({
name
:
'
id
'
,
description
:
'
APP 的 id
'
})
@
ApiParam
({
name
:
'
version
'
,
description
:
'
APP 的版本号
'
})
@
ApiQuery
({
type
:
DepotDto
,
description
:
'
APP 的类型
'
})
async
removeBuild
(
@
FetchMyCardUser
()
user
:
MyCardUser
,
@
Param
(
'
id
'
)
id
:
string
,
...
...
@@ -101,7 +100,6 @@ export class AppController {
@
ApiConsumes
(
'
multipart/form-data
'
)
@
ApiParam
({
name
:
'
id
'
,
description
:
'
APP 的 id
'
})
@
ApiParam
({
name
:
'
version
'
,
description
:
'
APP 的版本号
'
})
@
ApiQuery
({
type
:
DepotDto
,
description
:
'
APP 的类型
'
})
@
ApiBody
({
description
:
'
app 的 tar.zst 文件
'
,
type
:
FileUploadDto
,
...
...
console-api/src/update/update.controller.ts
View file @
c99e4b7b
import
{
Body
,
Controller
,
Get
,
Header
,
Param
,
ParseArrayPipe
,
Post
,
Query
,
Render
,
ValidationPipe
}
from
'
@nestjs/common
'
;
import
{
UpdateService
}
from
'
./update.service
'
;
import
{
ApiBody
,
ApiOkResponse
,
ApiOperation
,
ApiParam
,
ApiQuery
,
ApiTags
}
from
'
@nestjs/swagger
'
;
import
{
ApiBody
,
Api
CreatedResponse
,
Api
OkResponse
,
ApiOperation
,
ApiParam
,
ApiQuery
,
ApiTags
}
from
'
@nestjs/swagger
'
;
import
{
DepotDto
}
from
'
../dto/Depot.dto
'
;
@
Controller
(
'
update
'
)
...
...
@@ -19,7 +19,6 @@ export class UpdateController {
@
ApiOperation
({
summary
:
'
获取 app 校验和
'
,
description
:
'
是 shasum 的格式
'
})
@
ApiParam
({
name
:
'
id
'
,
description
:
'
APP 的 id
'
})
@
ApiParam
({
name
:
'
version
'
,
description
:
'
APP 的版本号
'
})
@
ApiQuery
({
type
:
DepotDto
,
description
:
'
APP 的类型
'
})
@
ApiOkResponse
({
type
:
String
})
@
Header
(
'
Cache-Control
'
,
'
public, max-age=31536000, immutable
'
)
async
getChecksum
(
...
...
@@ -35,7 +34,6 @@ export class UpdateController {
@
ApiOperation
({
summary
:
'
获取 app 完整包 metalink
'
,
description
:
'
只包含完整包的
'
})
@
ApiParam
({
name
:
'
id
'
,
description
:
'
APP 的 id
'
})
@
ApiParam
({
name
:
'
version
'
,
description
:
'
APP 的版本号
'
})
@
ApiQuery
({
type
:
DepotDto
,
description
:
'
APP 的类型
'
})
@
ApiOkResponse
({
type
:
String
})
@
Header
(
'
Cache-Control
'
,
'
public, max-age=31536000, immutable
'
)
async
getFullPackageMetalink
(
...
...
@@ -51,9 +49,8 @@ export class UpdateController {
@
ApiOperation
({
summary
:
'
获取 app 部分包 metalink
'
,
description
:
'
根据文件返回需要下载什么文件
'
})
@
ApiParam
({
name
:
'
id
'
,
description
:
'
APP 的 id
'
})
@
ApiParam
({
name
:
'
version
'
,
description
:
'
APP 的版本号
'
})
@
ApiQuery
({
type
:
DepotDto
,
description
:
'
APP 的类型
'
})
@
ApiBody
({
type
:
[
String
],
description
:
'
需要什么文件
'
})
@
Api
Ok
Response
({
type
:
String
})
@
Api
Created
Response
({
type
:
String
})
async
getPartPackageMetalink
(
@
Param
(
'
id
'
)
id
:
string
,
@
Query
(
new
ValidationPipe
({
transform
:
true
}))
depot
:
DepotDto
,
...
...
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