mirror of
https://github.com/certd/certd.git
synced 2026-04-23 11:37:23 +08:00
perf: 站点监控支持批量导入域名和ip
This commit is contained in:
@@ -105,6 +105,17 @@ export class SiteInfoController extends CrudController<SiteInfoService> {
|
||||
await this.service.checkAllByUsers(userId);
|
||||
return this.ok();
|
||||
}
|
||||
|
||||
@Post('/import', { summary: Constants.per.authOnly })
|
||||
async doImport(@Body(ALL) body: any) {
|
||||
const userId = this.getUserId();
|
||||
await this.service.doImport({
|
||||
text:body.text,
|
||||
userId
|
||||
})
|
||||
return this.ok();
|
||||
}
|
||||
|
||||
@Post('/ipCheckChange', { summary: Constants.per.authOnly })
|
||||
async ipCheckChange(@Body(ALL) bean: any) {
|
||||
const userId = this.getUserId();
|
||||
|
||||
@@ -111,5 +111,16 @@ export class SiteInfoController extends CrudController<SiteIpService> {
|
||||
return this.ok();
|
||||
}
|
||||
|
||||
@Post('/import', { summary: Constants.per.authOnly })
|
||||
async doImport(@Body(ALL) body: any) {
|
||||
const userId = this.getUserId();
|
||||
await this.service.doImport({
|
||||
text:body.text,
|
||||
userId,
|
||||
siteId:body.siteId
|
||||
})
|
||||
return this.ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user