fix: fixed checking if image posted is url

This commit is contained in:
Kevsl 2024-06-10 11:25:57 +02:00
parent ee314f520d
commit 40ebdde47a
2 changed files with 3 additions and 2 deletions

View File

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

View File

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