Skip to content

Commit

Permalink
event service fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
aletya committed Jun 10, 2024
1 parent a4e70a5 commit aa6bc15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/events/events-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit aa6bc15

Please sign in to comment.