fix(server): /search/random failing with certain options (#13040)

* fix relation handling, remove pagination

* update api, sql

* update mock
This commit is contained in:
Mert
2024-09-30 00:29:35 -04:00
committed by GitHub
parent 2f13db51df
commit 7adb35e59e
12 changed files with 250 additions and 62 deletions

View File

@@ -99,12 +99,6 @@ class BaseSearchDto {
@Optional({ nullable: true, emptyToNull: true })
lensModel?: string | null;
@IsInt()
@Min(1)
@Type(() => Number)
@Optional()
page?: number;
@IsInt()
@Min(1)
@Max(1000)
@@ -170,12 +164,24 @@ export class MetadataSearchDto extends RandomSearchDto {
@Optional()
@ApiProperty({ enumName: 'AssetOrder', enum: AssetOrder })
order?: AssetOrder;
@IsInt()
@Min(1)
@Type(() => Number)
@Optional()
page?: number;
}
export class SmartSearchDto extends BaseSearchDto {
@IsString()
@IsNotEmpty()
query!: string;
@IsInt()
@Min(1)
@Type(() => Number)
@Optional()
page?: number;
}
export class SearchPlacesDto {