mirror of
https://github.com/certd/certd.git
synced 2026-04-23 11:37:23 +08:00
chore: domain import 优化
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user