diff --git a/srcs/requirements/game_server/Dockerfile b/srcs/requirements/game_server/Dockerfile index 72857a78..f1a39fa0 100644 --- a/srcs/requirements/game_server/Dockerfile +++ b/srcs/requirements/game_server/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /usr/app COPY ./game_back ./ -RUN npm install typescript +RUN npm install RUN npx tsc diff --git a/srcs/requirements/nestjs/api_back/src/users/users.service.ts b/srcs/requirements/nestjs/api_back/src/users/users.service.ts index 680075da..82e47753 100644 --- a/srcs/requirements/nestjs/api_back/src/users/users.service.ts +++ b/srcs/requirements/nestjs/api_back/src/users/users.service.ts @@ -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); }