chore: 优化站点ip检查

This commit is contained in:
xiaojunnuo
2025-05-28 15:12:54 +08:00
parent a463711b03
commit 41f4617e66
5 changed files with 132 additions and 15 deletions
@@ -68,8 +68,12 @@ export class SiteInfoController extends CrudController<SiteIpService> {
@Post('/delete', { summary: Constants.per.authOnly })
async delete(@Query('id') id: number) {
const entity = await this.service.info(id);
await this.service.checkUserId(id, this.getUserId());
return await super.delete(id);
const res = await super.delete(id);
await this.service.updateIpCount(entity.siteId)
return res
}
@Post('/check', { summary: Constants.per.authOnly })