diff --git a/bun.lockb b/bun.lockb index cdcece1..9777d6a 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/src/controllers/disc.ts b/src/controllers/disc.ts index 420cee6..3b6e2d1 100644 --- a/src/controllers/disc.ts +++ b/src/controllers/disc.ts @@ -43,29 +43,17 @@ export const initDiscRoutes = (app: Elysia) => { ); /* Insert discs (bearer auth secured) */ - app.post( - "/disc", - async ({ request }) => { - assertIsRequestAuthorized(request); - const discs = (await Bun.readableStreamToJSON(request.body)) as IDisc[]; - return await Disc.insertMany(discs); - }, - { - type: "application/json" - } - ); + app.post("/disc", async ({ request }) => { + assertIsRequestAuthorized(request); + const discs = (await Bun.readableStreamToJSON(request.body)) as IDisc[]; + return await Disc.insertMany(discs); + }); /* Delete all discs (bearer auth secured) */ - app.delete( - "/disc", - async ({ request }) => { - assertIsRequestAuthorized(request); - return await Disc.deleteMany(); - }, - { - type: "application/json" - } - ); + app.delete("/disc", async ({ request }) => { + assertIsRequestAuthorized(request); + return await Disc.deleteMany(); + }); /* Delete disc by id (bearer auth secured) */ app.delete(