-
Notifications
You must be signed in to change notification settings - Fork 1
/
endpoints.txt
60 lines (53 loc) · 2.75 KB
/
endpoints.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Author: https://github.com/abdullahwins
Base URL: https://thefalaj.onrender.com
//admin
router.get("/admins/find/:id", authenticateToken, getOneAdmin);
router.get("/admins/delete/:id", authenticateToken, deleteAdminById);
router.get("/admins", authenticateToken, getAllAdmins);
router.get("/admins/types/:typeName", authenticateToken, getAdminsByType);
router.post("/admins/register", RegisterAdmin); = { fullName, email, password }
router.post("/admins/login", LoginAdmin); = { email, password }
router.patch("/admins/edit/:id", authenticateToken, updateAdminById);
router.post("/admins/reset", sendPasswordResetLink);
router.patch("/admins/resetpassword/:email", updateAdminPasswordByOldPassword);
router.patch("/admins/reset", updateAdminPasswordByEmail);
router.delete("/admins/delete/:id", deleteAdminById);
//owner
router.get("/owners/find/:id", getOneOwner);
router.get("/owners/delete/:id", deleteOwnerById);
router.get("/owners", getAllOwners);
router.get("/owners/types/:typeName", getOwnersByType);
router.post("/owners/register", RegisterOwner); = { fullName, email, password, falajName }
router.post("/owners/login", LoginOwner); = { email, password }
router.patch("/owners/edit/:id", updateOwnerById);
router.post("/owners/reset", sendPasswordResetLink);
router.patch("/owners/resetpassword/:email", updateOwnerPasswordByOldPassword);
router.patch("/owners/reset", updateOwnerPasswordByEmail);
router.delete("/owners/delete/:id", deleteOwnerById);
//user
router.get("/users/find/:id", getOneUser);
router.get("/users", getAllUsers);
router.get("/users/types/:typeName", getUsersByType);
router.post("/users/register", RegisterUser); = { fullName, email, password }
router.post("/users/login", LoginUser); = { email, password }
router.patch("/users/edit/:id", updateUserById);
router.post("/users/reset", sendPasswordResetLink);
router.patch("/users/reset", updateUserPasswordByEmail);
router.patch("/users/resetpassword/:email", updateUserPasswordByOldPassword);
router.delete("/users/delete/:id", deleteUserById);
//falaj
router.get("/falajes", getAllFalajes);
router.get("/falajes/find/:id", getOneFalaj);
router.post("/falajes/add", addOneFalaj); = { falazName, description, falazLocation, falazStartTime, falazEndTime }
router.patch("/falajes/update/:id", updateFalajById);
router.delete("/falajes/delete/:id", deleteOneFalajById);
//privacy policies
router.get("/policies", getOnePrivacyPolicy);
router.post("/policies/add", addOnePrivacyPolicy); = { privacyPolicy }
router.patch("/policies/update", updatePrivacyPolicyById); = { privacyPolicy }
router.delete("/policies/delete", deleteOnePrivacyPolicyById);
//TOS
router.get("/tos", getOneTOS);
router.post("/tos/add", addOneTOS); = {tos}
router.patch("/tos/update", updateTOSById); = {tos}
router.delete("/tos/delete", deleteOneTOSById);