diff --git a/backend/src/users/dto/update-avatar.dto.ts b/backend/src/users/dto/update-avatar.dto.ts index b4c15c2..dbaeebd 100644 --- a/backend/src/users/dto/update-avatar.dto.ts +++ b/backend/src/users/dto/update-avatar.dto.ts @@ -1,6 +1,6 @@ -import { IsUrl } from 'class-validator'; +import { IsString } from 'class-validator'; export class UpdateAvatarDto { - @IsUrl({}, { message: 'Picture must be a valid URL' }) + @IsString() picture: string; } diff --git a/backend/src/users/dto/update-username.dto.ts b/backend/src/users/dto/update-username.dto.ts index 16b9ceb..fa6d551 100644 --- a/backend/src/users/dto/update-username.dto.ts +++ b/backend/src/users/dto/update-username.dto.ts @@ -1,4 +1,10 @@ -import { IsNotEmpty, IsOptional, IsString, IsUrl, Length, Matches } from 'class-validator'; +import { + IsNotEmpty, + IsOptional, + IsString, + Length, + Matches, +} from 'class-validator'; export class UpdateUsernameDto { @IsString() @@ -9,7 +15,7 @@ export class UpdateUsernameDto { }) username: string; - @IsUrl() + @IsString() @IsOptional() picture: string; }