diff --git a/src/redux/slices/authSlice.ts b/src/redux/slices/authSlice.ts index ec63b8a..3a205fa 100644 --- a/src/redux/slices/authSlice.ts +++ b/src/redux/slices/authSlice.ts @@ -45,7 +45,7 @@ export const loginUser = createAsyncThunk< //use below commented endpoint if using deployed backend........ // const response = await http.post("admin/login", { - const response = await http.post("admin/login", { + const response = await http.post("/login", { email, password, }); diff --git a/src/redux/slices/profileSlice.ts b/src/redux/slices/profileSlice.ts index 1054f08..f881512 100644 --- a/src/redux/slices/profileSlice.ts +++ b/src/redux/slices/profileSlice.ts @@ -26,7 +26,7 @@ export const fetchAdminProfile = createAsyncThunk< const token = localStorage?.getItem("authToken"); if (!token) throw new Error("No token found"); - const response = await http.get("/auth/profile"); + const response = await http.get("/profile"); if (!response.data?.data) throw new Error("Invalid API response");