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