mirror of
https://github.com/certd/certd.git
synced 2026-04-23 11:37:23 +08:00
perf: 上传自定义证书
This commit is contained in:
@@ -84,4 +84,15 @@ export class CertInfoController extends CrudController<CertInfoService> {
|
||||
});
|
||||
return this.ok(list);
|
||||
}
|
||||
|
||||
@Post('/upload', { summary: Constants.per.authOnly })
|
||||
async upload(@Body(ALL) body: any) {
|
||||
if (body.id) {
|
||||
await this.service.checkUserId(body.id, this.getUserId());
|
||||
}
|
||||
|
||||
const res = await this.service.upload(body);
|
||||
|
||||
return this.ok(res);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user