mirror of
https://github.com/certd/certd.git
synced 2026-04-15 21:40:53 +08:00
chore:
This commit is contained in:
@@ -95,4 +95,12 @@ export class CertInfoController extends CrudController<CertInfoService> {
|
||||
|
||||
return this.ok(res);
|
||||
}
|
||||
|
||||
@Post('/getCert', { summary: Constants.per.authOnly })
|
||||
async getCert(@Query('id') id: number) {
|
||||
await this.service.checkUserId(id, this.getUserId());
|
||||
const certInfoEntity = await this.service.info(id);
|
||||
const certInfo = JSON.parse(certInfoEntity.certInfo);
|
||||
return this.ok(certInfo);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user