diff --git a/src/index.ts b/src/index.ts index fbee222..7b77b61 100644 --- a/src/index.ts +++ b/src/index.ts @@ -211,7 +211,8 @@ export const app = new Elysia() .post("/delete", async ({ body, headers }) => { const { id } = body checkHeaderKey(headers) - log(`[+] Received delete request for photo ${id}`) + log(`[+] Received delete request for photo ${id} (type: ${typeof id})`) + if (typeof id !== "string" || id.trim() === "") done(400, "Invalid photo ID") const metadata = await getMetadata()