Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sports_Club/README.md
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
61 lines (40 sloc)
1.13 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sports_Club | |
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 | |
router.post('/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 | |
router.post('/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); | |
} |