移除删除账号功能

This commit is contained in:
2026-07-16 10:16:56 +08:00
parent 6a43f33f7a
commit 1737563516
5 changed files with 23 additions and 55 deletions

View File

@@ -198,28 +198,6 @@ export class RbacController {
}
}
@Delete('users/:id')
@RequirePermission('user:delete')
async deleteUser(@Param('id') id: string, @Request() req: any) {
const { ipAddress, userAgent } = extractRequestInfo(req);
try {
const result = await this.rbacService.deleteUser(+id);
await this.logService.log({
userId: req.user?.id,
username: req.user?.username,
module: '账号',
action: '删除账号',
targetId: +id,
targetType: 'user',
ipAddress,
userAgent,
});
return result;
} catch (e: any) {
throw new BadRequestException(e.message);
}
}
@Put('users/:id/archive')
@RequirePermission('user:edit')
async archiveUser(@Param('id') id: string) {