perf: cname记录支持批量导入和导出

This commit is contained in:
xiaojunnuo
2026-01-22 10:56:45 +08:00
parent a97cee84f3
commit 607afe864a
10 changed files with 166 additions and 9 deletions
@@ -99,4 +99,15 @@ export class CnameRecordController extends CrudController<CnameRecordService> {
const res = await this.service.resetStatus(body.id);
return this.ok(res);
}
@Post('/import', { summary: Constants.per.authOnly })
async import(@Body(ALL) body: { domainList: string; cnameProviderId: any }) {
const userId = this.getUserId();
const res = await this.service.doImport({
userId,
domainList: body.domainList,
cnameProviderId: body.cnameProviderId,
});
return this.ok(res);
}
}