Skip to content

Commit

Permalink
fix: status messages
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalCodes committed Feb 28, 2024
1 parent 3c6f89b commit bbaef7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion routes/events/Event.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions static/Status.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit bbaef7c

Please sign in to comment.