From 01dcb50d015c6572ce9b0a1f7bf493e156ecf543 Mon Sep 17 00:00:00 2001 From: Mohit Kalshan Date: Mon, 3 Mar 2025 17:33:08 +0530 Subject: [PATCH] hotfix --- src/redux/slices/authSlice.ts | 2 +- src/redux/slices/profileSlice.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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");