chore: domain import 优化

This commit is contained in:
xiaojunnuo
2026-01-25 13:01:12 +08:00
parent 65f9d482f3
commit 662ca19f8f
9 changed files with 139 additions and 49 deletions
@@ -100,16 +100,6 @@ export class DomainController extends CrudController<DomainService> {
return this.ok(task);
}
@Post('/import/add', { summary: Constants.per.authOnly })
async importAdd(@Body(ALL) body: any) {
const { dnsProviderType, dnsProviderAccessId, title } = body;
const req = {
userId: this.getUserId(),
dnsProviderType, dnsProviderAccessId, title,
}
const item = await this.service.addDomainImportTask(req);
return this.ok(item);
}
@Post('/import/delete', { summary: Constants.per.authOnly })
async importDelete(@Body(ALL) body: any) {
@@ -122,6 +112,17 @@ export class DomainController extends CrudController<DomainService> {
return this.ok();
}
@Post('/import/save', { summary: Constants.per.authOnly })
async importSave(@Body(ALL) body: any) {
const { dnsProviderType, dnsProviderAccessId, key } = body;
const req = {
userId: this.getUserId(),
dnsProviderType, dnsProviderAccessId, key
}
const item = await this.service.saveDomainImportTask(req);
return this.ok(item);
}
@Post('/sync/expiration/start', { summary: Constants.per.authOnly })
async syncExpirationStart(@Body(ALL) body: any) {