npm i fix + fix d'un comportement incohérent au niveau des usernames.
This commit is contained in:
@@ -100,7 +100,7 @@ export class UsersService {
|
||||
|
||||
async update(id: number, updateUserDto: UpdateUsersDto, username : string) {
|
||||
console.log("Maj user username : " + username + " updateuser dto " + updateUserDto.username )
|
||||
if (await this.isUsernameExists(updateUserDto.username) === true && updateUserDto.username !== username) {
|
||||
if (await this.isUsernameExists(updateUserDto.username) === true && updateUserDto.username.toLowerCase() !== username.toLowerCase()) {
|
||||
// console.log('updating username ' + updateUserDto.username + ' but it already is in use')
|
||||
throw new HttpException(`The username is already in use.`,HttpStatus.CONFLICT);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user