feat(web,server): user avatar color (#4779)
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
SignUpDto,
|
||||
UserResponseDto,
|
||||
ValidateAccessTokenResponseDto,
|
||||
mapUser,
|
||||
} from '@app/domain';
|
||||
import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Req, Res } from '@nestjs/common';
|
||||
import { ApiTags } from '@nestjs/swagger';
|
||||
@@ -71,7 +72,7 @@ export class AuthController {
|
||||
@Post('change-password')
|
||||
@HttpCode(HttpStatus.OK)
|
||||
changePassword(@AuthUser() authUser: AuthUserDto, @Body() dto: ChangePasswordDto): Promise<UserResponseDto> {
|
||||
return this.service.changePassword(authUser, dto);
|
||||
return this.service.changePassword(authUser, dto).then(mapUser);
|
||||
}
|
||||
|
||||
@Post('logout')
|
||||
|
||||
@@ -13,6 +13,8 @@ import {
|
||||
Delete,
|
||||
Get,
|
||||
Header,
|
||||
HttpCode,
|
||||
HttpStatus,
|
||||
Param,
|
||||
Post,
|
||||
Put,
|
||||
@@ -54,6 +56,12 @@ export class UserController {
|
||||
return this.service.create(createUserDto);
|
||||
}
|
||||
|
||||
@Delete('profile-image')
|
||||
@HttpCode(HttpStatus.NO_CONTENT)
|
||||
deleteProfileImage(@AuthUser() authUser: AuthUserDto): Promise<void> {
|
||||
return this.service.deleteProfileImage(authUser);
|
||||
}
|
||||
|
||||
@AdminRoute()
|
||||
@Delete(':id')
|
||||
deleteUser(@AuthUser() authUser: AuthUserDto, @Param() { id }: UUIDParamDto): Promise<UserResponseDto> {
|
||||
|
||||
Reference in New Issue
Block a user