Refactor register and login thunks

This commit is contained in:
Alex Holliday committed 2024-08-17 13:03:24 -07:00
1 parent 41f975cdfa
commit 46bd317760
2 files changed
+16 -2

No files matched your search

+14
View File
@@ -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;