mirror of
https://github.com/Kevsl/crypto-exchange-api.git
synced 2025-07-08 21:50:13 +02:00
fix: fixed checking if image posted is url
This commit is contained in:
parent
ee314f520d
commit
40ebdde47a
@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsNumber, IsString } from 'class-validator';
|
||||
import { IsNumber, IsString, IsUrl } from 'class-validator';
|
||||
export class CryptoDto {
|
||||
@ApiProperty({
|
||||
type: String,
|
||||
@ -30,6 +30,7 @@ export class CryptoDto {
|
||||
description: 'Image for the cryptocurrency in ',
|
||||
example: 'https://myImage/com',
|
||||
})
|
||||
@IsUrl()
|
||||
@IsString()
|
||||
image: string;
|
||||
}
|
||||
|
@ -33,7 +33,6 @@ export class UserService {
|
||||
|
||||
const user = await this.prisma.user.findMany({
|
||||
select: {
|
||||
id: true,
|
||||
firstName: true,
|
||||
lastName: true,
|
||||
pseudo: true,
|
||||
@ -44,6 +43,7 @@ export class UserService {
|
||||
},
|
||||
},
|
||||
},
|
||||
take: 50,
|
||||
});
|
||||
return user;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user