mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:57:27 +08:00
perf: cname 域名映射记录可读性优化
This commit is contained in:
@@ -41,6 +41,7 @@ export class FileController extends BaseController {
|
||||
}
|
||||
const filePath = this.fileService.getFile(key, userId);
|
||||
this.ctx.response.attachment(filePath);
|
||||
this.ctx.response.set('Cache-Control', 'public,max-age=2592000');
|
||||
await send(this.ctx, filePath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ export class CnameProviderController extends BaseController {
|
||||
@Post('/list', { summary: Constants.per.authOnly })
|
||||
async list(@Body(ALL) body: any) {
|
||||
body.userId = this.getUserId();
|
||||
const res = await this.providerService.find({});
|
||||
const res = await this.providerService.list({});
|
||||
return this.ok(res);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,8 @@ export class CnameRecordController extends CrudController<CnameRecordService> {
|
||||
@Post('/list', { summary: Constants.per.authOnly })
|
||||
async list(@Body(ALL) body: any) {
|
||||
body.userId = this.getUserId();
|
||||
return super.list(body);
|
||||
const list = await this.getService().list(body);
|
||||
return this.ok(list);
|
||||
}
|
||||
|
||||
@Post('/add', { summary: Constants.per.authOnly })
|
||||
|
||||
Reference in New Issue
Block a user