chore(lint): get rid of "any" in attachments

req.file is of type "Express.Multer.File | undefined".
Returning with an "uploaded: false" type object -> same handling as in
image.ts
This commit is contained in:
Panagiotis Papadopoulos 2025-03-06 22:59:31 +01:00
parent dfb8982a99
commit c8e36942fc

View File

@ -43,7 +43,14 @@ function saveAttachment(req: Request) {
function uploadAttachment(req: Request) {
const { noteId } = req.params;
const { file } = req as any;
const { file } = req;
if (!file) {
return {
uploaded: false,
message: `Missing attachment data.`
};
}
const note = becca.getNoteOrThrow(noteId);
let url;