Fix rest verbs

This commit is contained in:
Alex Holliday committed 2024-08-02 11:54:46 -07:00
1 parent b5e12dabc4
commit aed4881eac
4 files changed
+14 -20

No files matched your search

+2 -4
View File
@@ -61,7 +61,7 @@ export const update = createAsyncThunk(
form.deleteProfileImage &&
fd.append("deleteProfileImage", form.deleteProfileImage);
const res = await axiosInstance.post(`/auth/user/${user._id}`, fd, {
const res = await axiosInstance.put(`/auth/user/${user._id}`, fd, {
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "multipart/form-data",
@@ -185,9 +185,7 @@ const handleForgotRejected = (state, action) => {
const handleNewPasswordRejected = (state, action) => {
state.isLoading = false;
state.success = false;
state.msg = action.payload
? action.payload.msg
: "Failed to reset password.";
state.msg = action.payload ? action.payload.msg : "Failed to reset password.";
};
const authSlice = createSlice({