npm i fix + fix d'un comportement incohérent au niveau des usernames.

This commit is contained in:
cherif
2023-01-17 21:27:25 +01:00
parent 84e84127ec
commit e631109d31
2 changed files with 2 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ WORKDIR /usr/app
COPY ./game_back ./
RUN npm install typescript
RUN npm install
RUN npx tsc

View File

@@ -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);
}