mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 09:24:54 +00:00
refactor delete user endpoint
This commit is contained in:
@ -1,10 +1,8 @@
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
Delete,
|
||||
Get,
|
||||
HttpStatus,
|
||||
Param,
|
||||
Post,
|
||||
Req,
|
||||
UseGuards,
|
||||
@ -51,20 +49,6 @@ export class UserAuthController {
|
||||
};
|
||||
}
|
||||
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(SuperAdminRoleGuard)
|
||||
@Delete('user/delete/:id')
|
||||
async userDelete(@Param('id') id: string) {
|
||||
await this.userAuthService.deleteUser(id);
|
||||
return {
|
||||
statusCode: HttpStatus.OK,
|
||||
data: {
|
||||
id,
|
||||
},
|
||||
message: 'User Deleted Successfully',
|
||||
};
|
||||
}
|
||||
|
||||
@Post('user/send-otp')
|
||||
async sendOtp(@Body() otpDto: UserOtpDto) {
|
||||
const otpCode = await this.userAuthService.generateOTP(otpDto);
|
||||
|
||||
Reference in New Issue
Block a user