diff --git a/routes/events/Event.js b/routes/events/Event.js index ac2ed4d..c39912f 100644 --- a/routes/events/Event.js +++ b/routes/events/Event.js @@ -59,7 +59,7 @@ router.post("/create", async (req, res) => { if (existingEvent) { return res .status(STATUSCODE.CONFLICT) - .json({ message: "Already exists" }); + .json({ message: STATUSMESSAGE.EVENT_UID_ALREADY_EXISTS }); } const { Token } = req.cookies; diff --git a/static/Status.js b/static/Status.js index 0e18906..838860e 100644 --- a/static/Status.js +++ b/static/Status.js @@ -40,6 +40,7 @@ const STATUSMESSAGE = { FORBIDDEN: "Forbidden !", NOT_FOUND: "Not found !", EVENT_NOT_FOUND: "Event not found !", + EVENT_UID_ALREADY_EXISTS: "Please choose another unique event uid !", CREATE_EVENT_FAILED: "Failed to create event", PRODUCT_SLUG_ALREADY_EXISTS: "productSlug already exists", PRODUCT_ADD_FAILED: "Failed to add product",