Refactor register and login thunks
This commit is contained in:
1 parent
41f975cdfa
commit
46bd317760
2 files changed
+16
-2
No files matched your search
@@ -90,4 +90,18 @@ axiosInstance.deleteMonitorById = async (authToken, monitorId) => {
|
||||
});
|
||||
};
|
||||
|
||||
// **********************************
|
||||
// Register a new user
|
||||
// **********************************
|
||||
axiosInstance.registerUser = async (form) => {
|
||||
return axiosInstance.post(`/auth/register`, form);
|
||||
};
|
||||
|
||||
// **********************************
|
||||
// Log in an exisiting user
|
||||
// **********************************
|
||||
axiosInstance.loginUser = async (form) => {
|
||||
return axiosInstance.post(`/auth/login`, form);
|
||||
};
|
||||
|
||||
export default axiosInstance;
|
||||
Reference in new issue
Block a user