From aa6bc15821b48a1860bf252e21f42111c69c4e6f Mon Sep 17 00:00:00 2001 From: Alex Yang <32620988+DatProJack@users.noreply.github.com> Date: Mon, 10 Jun 2024 08:31:02 -0400 Subject: [PATCH] event service fixed --- src/services/events/events-router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/events/events-router.ts b/src/services/events/events-router.ts index 6deaeca..ec651d1 100644 --- a/src/services/events/events-router.ts +++ b/src/services/events/events-router.ts @@ -75,7 +75,7 @@ eventsRouter.get("/", async (req, res, next) => { eventsRouter.delete("/:EVENTID", async (req, res, next) => { const eventId = req.params.EVENTID; try { - await Database.EVENTS.findByIdAndDelete({ eventId: eventId }); + await Database.EVENTS.findOneAndDelete({ eventId: eventId }); return res.sendStatus(StatusCodes.NO_CONTENT); } catch (error) {