chore: fix format

This commit is contained in:
Emrik Östling 2025-12-01 22:31:10 +01:00
parent 550f472451
commit 5268838975

View file

@ -25,11 +25,11 @@ export const upload = new Elysia().use(userService).post(
if (body?.file) { if (body?.file) {
if (Array.isArray(body.file)) { if (Array.isArray(body.file)) {
for (const file of body.file) { for (const file of body.file) {
const santizedFileName = sanitize(file.name) const santizedFileName = sanitize(file.name);
await Bun.write(`${userUploadsDir}${santizedFileName}`, file); await Bun.write(`${userUploadsDir}${santizedFileName}`, file);
} }
} else { } else {
const santizedFileName = sanitize(body.file["name"]) const santizedFileName = sanitize(body.file["name"]);
await Bun.write(`${userUploadsDir}${santizedFileName}`, body.file); await Bun.write(`${userUploadsDir}${santizedFileName}`, body.file);
} }
} }