From a9e29b79fdf5c150a23e3e48450ed848611b2a48 Mon Sep 17 00:00:00 2001 From: Alireza Hassani Date: Sat, 3 Oct 2026 20:46:44 +0330 Subject: [PATCH] Accept marketplace banners at 18:6 (3:1) aspect ratio. Co-authored-by: Cursor --- src/business-profile/business-profile.service.ts | 6 +++--- src/business-profile/business-profile.types.ts | 2 +- src/business-profile/dto/update-business-profile.dto.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/business-profile/business-profile.service.ts b/src/business-profile/business-profile.service.ts index 7d49945..95cfcd4 100644 --- a/src/business-profile/business-profile.service.ts +++ b/src/business-profile/business-profile.service.ts @@ -549,7 +549,7 @@ export class BusinessProfileService { } } - /** Recommended banner aspect 18:4.5 (4:1). Soft-check when dimensions exist. */ + /** Recommended banner aspect 18:6 (3:1). Soft-check when dimensions exist. */ private async assertBannerMedia(businessId: bigint, mediaId: bigint) { const media = await this.prisma.media.findFirst({ where: { id: mediaId, businessId }, @@ -562,10 +562,10 @@ export class BusinessProfileService { if (media.width && media.height && media.height > 0) { const ratio = media.width / media.height; - const target = 18 / 4.5; // 4 + const target = 18 / 6; // 3 if (Math.abs(ratio - target) / target > 0.12) { throw new BadRequestException( - 'Banner aspect ratio should be about 18:4.5 (4:1)', + 'Banner aspect ratio should be about 18:6 (3:1)', ); } } diff --git a/src/business-profile/business-profile.types.ts b/src/business-profile/business-profile.types.ts index c3a113a..dccaf0c 100644 --- a/src/business-profile/business-profile.types.ts +++ b/src/business-profile/business-profile.types.ts @@ -41,7 +41,7 @@ export type BusinessProfile = { logoDarkUrl: string | null; faviconMediaId: string | null; faviconUrl: string | null; - /** Recommended aspect ratio 18:4.5 (4:1). */ + /** Recommended aspect ratio 18:6 (3:1). */ bannerMediaId: string | null; bannerUrl: string | null; categoryIds: string[]; diff --git a/src/business-profile/dto/update-business-profile.dto.ts b/src/business-profile/dto/update-business-profile.dto.ts index 9f228f0..40f1f4e 100644 --- a/src/business-profile/dto/update-business-profile.dto.ts +++ b/src/business-profile/dto/update-business-profile.dto.ts @@ -136,7 +136,7 @@ export class UpdateBusinessProfileDto { @IsInt() faviconMediaId?: number | null; - /** Marketplace/storefront banner; recommended aspect 18:4.5 (4:1). */ + /** Marketplace/storefront banner; recommended aspect 18:6 (3:1). */ @IsOptional() @Type(() => Number) @IsInt()