Skip to content

Commit 5a92a8f

Browse files
authored
Merge pull request #142 from stakepoint/avatar_fix
fix: remove validation from picture url
2 parents 18e0d46 + 083faf3 commit 5a92a8f

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { IsUrl } from 'class-validator';
1+
import { IsString } from 'class-validator';
22

33
export class UpdateAvatarDto {
4-
@IsUrl({}, { message: 'Picture must be a valid URL' })
4+
@IsString()
55
picture: string;
66
}

backend/src/users/dto/update-username.dto.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import { IsNotEmpty, IsOptional, IsString, IsUrl, Length, Matches } from 'class-validator';
1+
import {
2+
IsNotEmpty,
3+
IsOptional,
4+
IsString,
5+
Length,
6+
Matches,
7+
} from 'class-validator';
28

39
export class UpdateUsernameDto {
410
@IsString()
@@ -9,7 +15,7 @@ export class UpdateUsernameDto {
915
})
1016
username: string;
1117

12-
@IsUrl()
18+
@IsString()
1319
@IsOptional()
1420
picture: string;
1521
}

0 commit comments

Comments
 (0)