From a9cd7d9c0428268d8f5802d6d7a3f5753b992b71 Mon Sep 17 00:00:00 2001 From: Evorp <75297863+3vorp@users.noreply.github.com> Date: Tue, 26 Nov 2024 00:22:18 -0800 Subject: [PATCH] fix addon image validation (lol) --- src/v2/service/addon.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v2/service/addon.service.ts b/src/v2/service/addon.service.ts index 6b38a76..68d6e47 100644 --- a/src/v2/service/addon.service.ts +++ b/src/v2/service/addon.service.ts @@ -43,7 +43,7 @@ export default class AddonService { private readonly addonRepo = new AddonFirestormRepository(); private validateImageType(mediaType: string) { - if (ACCEPTED_IMAGE_TYPES.includes(mediaType)) + if (!ACCEPTED_IMAGE_TYPES.includes(mediaType)) throw new BadRequestError( `Incorrect MIME type for input file: got ${mediaType}, expected ${ACCEPTED_IMAGE_TYPES.join(" | ")}`, );