mirror of
https://github.com/Kevsl/crypto-exchange-api.git
synced 2025-07-09 06:00:12 +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 { ApiProperty } from '@nestjs/swagger';
|
||||||
import { IsNumber, IsString } from 'class-validator';
|
import { IsNumber, IsString, IsUrl } from 'class-validator';
|
||||||
export class CryptoDto {
|
export class CryptoDto {
|
||||||
@ApiProperty({
|
@ApiProperty({
|
||||||
type: String,
|
type: String,
|
||||||
@ -30,6 +30,7 @@ export class CryptoDto {
|
|||||||
description: 'Image for the cryptocurrency in ',
|
description: 'Image for the cryptocurrency in ',
|
||||||
example: 'https://myImage/com',
|
example: 'https://myImage/com',
|
||||||
})
|
})
|
||||||
|
@IsUrl()
|
||||||
@IsString()
|
@IsString()
|
||||||
image: string;
|
image: string;
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,6 @@ export class UserService {
|
|||||||
|
|
||||||
const user = await this.prisma.user.findMany({
|
const user = await this.prisma.user.findMany({
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
|
||||||
firstName: true,
|
firstName: true,
|
||||||
lastName: true,
|
lastName: true,
|
||||||
pseudo: true,
|
pseudo: true,
|
||||||
@ -44,6 +43,7 @@ export class UserService {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
take: 50,
|
||||||
});
|
});
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user