mirror of
https://github.com/ershisan99/flashcards-api.git
synced 2025-12-16 20:59:26 +00:00
feat: add delete current user account use case
This commit is contained in:
@@ -107,7 +107,7 @@ export class AuthController {
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@HttpCode(HttpStatus.NO_CONTENT)
|
||||
@Delete('me')
|
||||
async deleteUserAccount(@Request() req): Promise<UserEntity> {
|
||||
async deleteUserAccount(@Request() req): Promise<void> {
|
||||
const userId = req.user.id
|
||||
|
||||
return await this.commandBus.execute(new DeleteCurrentAccountCommand(userId))
|
||||
|
||||
Reference in New Issue
Block a user