hotfix
This commit is contained in:
parent
4c63007072
commit
01dcb50d01
|
@ -45,7 +45,7 @@ export const loginUser = createAsyncThunk<
|
||||||
//use below commented endpoint if using deployed backend........
|
//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("admin/login", {
|
const response = await http.post("/login", {
|
||||||
email,
|
email,
|
||||||
password,
|
password,
|
||||||
});
|
});
|
||||||
|
|
|
@ -26,7 +26,7 @@ export const fetchAdminProfile = createAsyncThunk<
|
||||||
const token = localStorage?.getItem("authToken");
|
const token = localStorage?.getItem("authToken");
|
||||||
if (!token) throw new Error("No token found");
|
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");
|
if (!response.data?.data) throw new Error("Invalid API response");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue