Add several endpoints
This commit is contained in:
1 parent
5beb0684a7
commit
f78e5ca94c
5 files changed
+29
-9
No files matched your search
@@ -151,4 +151,29 @@ axiosInstance.setNewPassword = async (recoveryToken, form) => {
|
||||
});
|
||||
};
|
||||
|
||||
// **********************************
|
||||
// Check for admin user
|
||||
// **********************************
|
||||
axiosInstance.doesAdminExist = async () => {
|
||||
return axiosInstance.get("/auth/users/admin");
|
||||
};
|
||||
|
||||
// **********************************
|
||||
// Get all users
|
||||
// **********************************
|
||||
axiosInstance.getAllUsers = async (authToken) => {
|
||||
return axiosInstance.get("/auth/users", {
|
||||
headers: { Authorization: `Bearer ${authToken}` },
|
||||
});
|
||||
};
|
||||
|
||||
// **********************************
|
||||
// Verify Invitation Token
|
||||
// **********************************
|
||||
axiosInstance.verifyInvitationToken = async (token) => {
|
||||
return axiosInstance.post(`/auth/invite/verify`, {
|
||||
token,
|
||||
});
|
||||
};
|
||||
|
||||
export default axiosInstance;
|
||||
Reference in new issue
Block a user