From 1a8d3d5acdb2a6d809f58069528355d033226151 Mon Sep 17 00:00:00 2001 From: timonrieger Date: Fri, 27 Feb 2026 16:37:10 +0100 Subject: [PATCH] web type fixes --- server/src/dtos/search.dto.ts | 2 +- web/src/lib/utils/asset-utils.ts | 4 ++-- web/src/lib/utils/file-uploader.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/src/dtos/search.dto.ts b/server/src/dtos/search.dto.ts index 9e57109935..15b28d2710 100644 --- a/server/src/dtos/search.dto.ts +++ b/server/src/dtos/search.dto.ts @@ -76,7 +76,7 @@ const MetadataSearchSchema = RandomSearchSchema.extend({ previewPath: z.string().optional().describe('Filter by preview file path'), thumbnailPath: z.string().optional().describe('Filter by thumbnail file path'), encodedVideoPath: z.string().optional().describe('Filter by encoded video file path'), - order: AssetOrderSchema.default(AssetOrder.Desc).describe('Sort order'), + order: AssetOrderSchema.default(AssetOrder.Desc).optional().describe('Sort order'), page: z.number().min(1).optional().describe('Page number'), }).meta({ id: 'MetadataSearchDto' }); diff --git a/web/src/lib/utils/asset-utils.ts b/web/src/lib/utils/asset-utils.ts index d6dd37c653..79ce9c411f 100644 --- a/web/src/lib/utils/asset-utils.ts +++ b/web/src/lib/utils/asset-utils.ts @@ -366,7 +366,7 @@ export const deleteStack = async (stackIds: string[]) => { const assets = stacks.flatMap((stack) => stack.assets); for (const asset of assets) { - asset.stack = null; + asset.stack = undefined; } return assets; @@ -385,7 +385,7 @@ export const keepThisDeleteOthers = async (keepAsset: AssetResponseDto, stack: S toastManager.success($t('kept_this_deleted_others', { values: { count: assetsToDeleteIds.length } })); - keepAsset.stack = null; + keepAsset.stack = undefined; return keepAsset; } catch (error) { handleError(error, $t('errors.failed_to_keep_this_delete_others')); diff --git a/web/src/lib/utils/file-uploader.ts b/web/src/lib/utils/file-uploader.ts index f2a4cdec4f..49ec03c17e 100644 --- a/web/src/lib/utils/file-uploader.ts +++ b/web/src/lib/utils/file-uploader.ts @@ -8,8 +8,8 @@ import { uploadRequest } from '$lib/utils'; import { ExecutorQueue } from '$lib/utils/executor-queue'; import { asQueryString } from '$lib/utils/shared-links'; import { - Action, AssetMediaStatus, + AssetUploadAction, AssetVisibility, checkBulkUpload, getBaseUrl, @@ -181,7 +181,7 @@ async function fileUploader({ const { results: [checkUploadResult], } = await checkBulkUpload({ assetBulkUploadCheckDto: { assets: [{ id: assetFile.name, checksum }] } }); - if (checkUploadResult.action === Action.Reject && checkUploadResult.assetId) { + if (checkUploadResult.action === AssetUploadAction.Reject && checkUploadResult.assetId) { responseData = { status: AssetMediaStatus.Duplicate, id: checkUploadResult.assetId,