Skip to content

Commit

Permalink
defined more
Browse files Browse the repository at this point in the history
  • Loading branch information
TharindaPrabhath committed Nov 1, 2021
1 parent 818fe63 commit 9adcdaa
Showing 1 changed file with 57 additions and 28 deletions.
85 changes: 57 additions & 28 deletions src/data/requests.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,63 @@
const login = "/auth/login"
const validateToken = "/auth/validateToken"
const refreshToken = "/auth/refresh-token"
const validateCertificate = "/certificate/validate"
const changePassword = "/admin/change-password"
const login = "/auth/login";
const validateToken = "/auth/validateToken";
const refreshToken = "/auth/refresh-token";
const validateCertificate = "/certificate/validate";
const changePassword = "/admin/change-password";

const fetchAdminByUsername = "/admin/get/byUsername"
const fetchAdmins = "/admin"
const fetchUser = "/user/get"
const fetchUsers = "/user"
const fetchSuggestionUsers = "/user/get-suggestions"
const fetchCertificate = "/certificate/get"
const fetchCertificates = "/certificate"
const fetchCertificatesByUser = "/certificate/byUser"
const fetchAdminsAnalytics = "/analytics/admin"
const fetchUsersAnalytics = "/analytics/user"
const fetchCertificatesAnalytics = "/analytics/certificate"
const fetchActivities = "/activity"
const fetchAdminByUsername = "/admin/get/byUsername";
const fetchAdmins = "/admin";
const fetchUser = "/user/get";
const fetchUsers = "/user";
const fetchSuggestionUsers = "/user/get-suggestions";
const fetchCertificate = "/certificate/get";
const fetchCertificates = "/certificate";
const fetchCertificatesByUser = "/certificate/byUser";
const fetchAdminsAnalytics = "/analytics/admin";
const fetchUsersAnalytics = "/analytics/user";
const fetchCertificatesAnalytics = "/analytics/certificate";
const fetchActivities = "/activity";
const fetchEvents = "/event";
const fetchReports = "/certificate-bulk-report";

const postNewUser = "/user/add"
const postNewCertificate = "/certificate/add"
const postNewThirdPartyCertificate = "/certificate/add/third-party"
const postNewUser = "/user/add";
const postNewCertificate = "/certificate/add";
const postNewThirdPartyCertificate = "/certificate/add/third-party";
const postCertificateBulk = "/certificate-bulk/add";

const updateUser = "/user/update"
const updateCertificate = "/certificate/update"
const updateUser = "/user/update";
const updateCertificate = "/certificate/update";

const deleteUser = "/user/delete"
const deleteCertificate = "/certificate/delete"
const deleteUser = "/user/delete";
const deleteCertificate = "/certificate/delete";

const requests = {
login,
validateToken,
refreshToken,
validateCertificate,
changePassword,
fetchAdminByUsername,
fetchAdmins,
fetchUser,
fetchUsers,
fetchSuggestionUsers,
fetchCertificate,
fetchCertificatesByUser,
fetchCertificates,
fetchAdminsAnalytics,
fetchUsersAnalytics,
fetchCertificatesAnalytics,
fetchActivities,
fetchEvents,
fetchReports,
postNewUser,
postNewCertificate,
postNewThirdPartyCertificate,
postCertificateBulk,
updateUser,
updateCertificate,
deleteUser,
deleteCertificate,
};

const requests = {login, validateToken, refreshToken, validateCertificate, changePassword, fetchAdminByUsername , fetchAdmins, fetchUser, fetchUsers, fetchSuggestionUsers, fetchCertificate,
fetchCertificatesByUser, fetchCertificates, fetchAdminsAnalytics, fetchUsersAnalytics, fetchCertificatesAnalytics, fetchActivities, postNewUser, postNewCertificate,
postNewThirdPartyCertificate, updateUser, updateCertificate, deleteUser, deleteCertificate }

export default requests;

0 comments on commit 9adcdaa

Please sign in to comment.