forked from Cutlery/immich
set max
This commit is contained in:
parent
da34bd714e
commit
43e0a59f93
@ -85,7 +85,7 @@ export class SearchRepository implements ISearchRepository {
|
|||||||
pagination: SearchPaginationOptions,
|
pagination: SearchPaginationOptions,
|
||||||
{ embedding, userIds, personIds, ...options }: SmartSearchOptions,
|
{ embedding, userIds, personIds, ...options }: SmartSearchOptions,
|
||||||
): Paginated<AssetEntity> {
|
): Paginated<AssetEntity> {
|
||||||
if (!isValidInteger(pagination.size, { min: 1 })) {
|
if (!isValidInteger(pagination.size, { min: 1, max: 1000 })) {
|
||||||
throw new Error(`Invalid value for 'size': ${pagination.size}`);
|
throw new Error(`Invalid value for 'size': ${pagination.size}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ export class SearchRepository implements ISearchRepository {
|
|||||||
maxDistance,
|
maxDistance,
|
||||||
hasPerson,
|
hasPerson,
|
||||||
}: FaceEmbeddingSearch): Promise<FaceSearchResult[]> {
|
}: FaceEmbeddingSearch): Promise<FaceSearchResult[]> {
|
||||||
if (!isValidInteger(numResults, { min: 1 })) {
|
if (!isValidInteger(numResults, { min: 1, max: 1000 })) {
|
||||||
throw new Error(`Invalid value for 'numResults': ${numResults}`);
|
throw new Error(`Invalid value for 'numResults': ${numResults}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user