Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Sports_Club | ||
|
||
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); | ||
|
||
} |