diff --git a/src/client/client.service.ts b/src/client/client.service.ts index 6d8abc4..0211c1e 100644 --- a/src/client/client.service.ts +++ b/src/client/client.service.ts @@ -47,7 +47,7 @@ export interface MediaLimits { * receive. Per-client `maxBytes` cannot legitimately go above its route's * multer ceiling, so the defaults below are kept at-or-below those. */ -export const DEFAULT_MEDIA_MIN_BYTES = 20 * 1024; // 100KB +export const DEFAULT_MEDIA_MIN_BYTES = 10; // 10 Byte export const DEFAULT_MEDIA_MAX_BYTES = 100 * 1024 * 1024; // 100MB export const DEFAULT_MEDIA_LIMITS: Record = { @@ -185,13 +185,19 @@ export class ClientService { _id: new Types.ObjectId(idString), }); const configured = client?.settings?.carBodyAccidentMaxAgeDays; - if (typeof configured === "number" && Number.isFinite(configured) && configured > 0) { + if ( + typeof configured === "number" && + Number.isFinite(configured) && + configured > 0 + ) { return configured; } return DEFAULT_CAR_BODY_ACCIDENT_MAX_AGE_DAYS; } - private resolveClientObjectId(clientKey: string | Types.ObjectId): Types.ObjectId { + private resolveClientObjectId( + clientKey: string | Types.ObjectId, + ): Types.ObjectId { const raw = String(clientKey ?? "").trim(); if (!Types.ObjectId.isValid(raw)) { throw new BadRequestException("Invalid client key"); @@ -293,7 +299,8 @@ export class ClientService { const $set: Record = {}; if (body.carBodyAccidentMaxAgeDays !== undefined) { - $set["settings.carBodyAccidentMaxAgeDays"] = body.carBodyAccidentMaxAgeDays; + $set["settings.carBodyAccidentMaxAgeDays"] = + body.carBodyAccidentMaxAgeDays; } if (body.media) {