This commit is contained in:
xiaojunnuo
2024-10-03 01:29:12 +08:00
parent aeed24e87d
commit c9d18f6d8a
17 changed files with 100 additions and 34 deletions
@@ -73,8 +73,11 @@ export class UserController extends CrudController<UserService> {
@Post('/delete', { summary: 'sys:auth:user:remove' })
async delete(
@Query('id')
id : number
id: number
) {
if (id === 1) {
throw new Error('不能删除默认的管理员用户');
}
return await super.delete(id);
}