This commit is contained in:
Me
2023-01-17 21:30:52 +01:00
5 changed files with 613 additions and 850 deletions

View File

@@ -77,7 +77,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()) {
throw new HttpException(`The username is already in use.`,HttpStatus.CONFLICT);
}
const user = await this.userRepository.preload(