Skip to content
Switch branches/tags


the server listens to: http://localhost:3000/

To access the api as a user, the user must get user verification token.

For the admin, the admin must get verification token and stored in the local database

Every API called is verified using cookie-parser

examples for API CALLS:

EVENTS{ //Create'/create-event',verifyAdmin, createEvent)

//update router.put("/:id", verifyAdmin, updateEvent); //delete router.delete("/delete/:id", verifyAdmin, deleteEvents); //get router.get("/:id", getEvent); //get list router.get("/getAll", getAllEvents); }

CLUBS:{ //Create'/create-club',verifyAdmin, createClub)

//update router.put("/update/:id", verifyAdmin, updateClub);

//update user router.put("/update-user/:id",verifyUser,registerClub) //delete router.delete("/delete/:id", verifyAdmin, deleteClubs); //get router.get("/get/:id", getClub); //get list

router.get("/getAll", getAllClub);

router.get("/countByClubs", getAllClub);

OUTDOOR / INDOOR router.get("/countByType", countByType);

//Featured Club FEATURED = TRUE router.get("/featured", featuredClub);

//custom search router.get("/search", searchQ);