perf: 站点监控支持批量导入域名和ip

This commit is contained in:
xiaojunnuo
2025-06-05 23:31:36 +08:00
parent 6467edb843
commit 2d7729dbe9
12 changed files with 358 additions and 98 deletions
@@ -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();
}
}