移除删除账号功能
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user