fix(server): not building due to API change

This commit is contained in:
Elian Doran 2024-12-11 08:16:37 +02:00
parent 289e33f479
commit 181ee3ef6d
No known key found for this signature in database

View File

@ -7,7 +7,7 @@ import sanitize_attribute_name from "../../services/sanitize_attribute_name.js";
import specialNotesService from "../../services/special_notes.js"; import specialNotesService from "../../services/special_notes.js";
import { Request } from 'express'; import { Request } from 'express';
function uploadImage(req: Request) { async function uploadImage(req: Request) {
const file = req.file; const file = req.file;
if (!file) { if (!file) {
@ -24,7 +24,7 @@ function uploadImage(req: Request) {
return [400, "Invalid image content type."]; return [400, "Invalid image content type."];
} }
const uploadedImageType = imageType(file.buffer); const uploadedImageType = await imageType(file.buffer);
if (!uploadedImageType) { if (!uploadedImageType) {
return [400, "Unable to determine image type."]; return [400, "Unable to determine image type."];
} }