This commit is contained in:
xiaojunnuo
2024-12-24 01:12:12 +08:00
parent cb27d4b490
commit ffa4de6911
14 changed files with 107 additions and 33 deletions
@@ -51,7 +51,16 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
}
}
return await this.repository.save(data);
data.disabled = false;
return await super.add(data);
}
async update(data: any) {
if (!data.id) {
throw new Error('id is required');
}
delete data.userId;
await super.update(data);
}
async getUserMonitorCount(userId: number) {