From b55f2d1bcb54e6c45b5461761a696bbadbdf93ff Mon Sep 17 00:00:00 2001 From: almog8k Date: Tue, 5 May 2026 12:50:34 +0300 Subject: [PATCH] fix: simplify file extension handling in tilesDeletionParamsBaseSchema --- src/schemas/core/tile.schema.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/schemas/core/tile.schema.ts b/src/schemas/core/tile.schema.ts index e04087e..3e46911 100644 --- a/src/schemas/core/tile.schema.ts +++ b/src/schemas/core/tile.schema.ts @@ -12,10 +12,7 @@ export const tileRangeSchema = z.object({ export const tilesDeletionParamsBaseSchema = z.object({ tilesPath: z.string().min(1), // Base path for the tiles to be deleted ranges: z.array(tileRangeSchema).min(1), // Array of tile ranges to be deleted - fileExtension: z - .literal(TileOutputFormat.PNG) - .transform((val) => val.toLowerCase()) - .or(z.literal(TileOutputFormat.JPEG).transform((val) => val.toLowerCase())), // File extension of the tiles (e.g., 'png', 'jpeg') + fileExtension: z.literal(TileOutputFormat.PNG.toLowerCase()).or(z.literal(TileOutputFormat.JPEG.toLowerCase())), // File extension of the tiles (e.g., 'png', 'jpeg') }); export const s3TilesDeletionParamsSchema = tilesDeletionParamsBaseSchema.extend({