HM-115. Исключение ситуации, когда может быть отправлен password при редактировании инфы о пользователе

This commit is contained in:
vigdorov
2020-08-08 09:19:01 +03:00
parent 2c08d7d8c7
commit 1bb5bd88bc

View File

@ -209,10 +209,10 @@ export class UserService {
return await this.findOne(token.login); return await this.findOne(token.login);
} }
async updateSelf(access_token: string, updateUser: UpdateUserSelf): Promise<UserResponse> { async updateSelf(access_token: string, {avatar}: UpdateUserSelf): Promise<UserResponse> {
const {login} = jwt.decode(access_token) as Token; const {login} = jwt.decode(access_token) as Token;
return await this.update({ return await this.update({
...updateUser, avatar,
login, login,
}); });
} }