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

View File

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