From 181ee3ef6d53a3b215c63529d4f9345a6e805c6a Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Wed, 11 Dec 2024 08:16:37 +0200 Subject: [PATCH] fix(server): not building due to API change --- src/routes/api/sender.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/api/sender.ts b/src/routes/api/sender.ts index 890eefa98..22eea766d 100644 --- a/src/routes/api/sender.ts +++ b/src/routes/api/sender.ts @@ -7,7 +7,7 @@ import sanitize_attribute_name from "../../services/sanitize_attribute_name.js"; import specialNotesService from "../../services/special_notes.js"; import { Request } from 'express'; -function uploadImage(req: Request) { +async function uploadImage(req: Request) { const file = req.file; if (!file) { @@ -24,7 +24,7 @@ function uploadImage(req: Request) { return [400, "Invalid image content type."]; } - const uploadedImageType = imageType(file.buffer); + const uploadedImageType = await imageType(file.buffer); if (!uploadedImageType) { return [400, "Unable to determine image type."]; }