add user management features: implement user creation, editing, and deletion; enhance dashboard with user selection prompt; improve token verification and alert handling
This commit is contained in:
11
admin/src/utils/fetcher.ts
Normal file
11
admin/src/utils/fetcher.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import Cookies from "js-cookie";
|
||||
|
||||
export const fetchUserData = async () => {
|
||||
const response = await fetch("http://localhost:8002/api/allUsers", {
|
||||
headers: {
|
||||
Authorization: `Bearer ${Cookies.get("token")}`,
|
||||
},
|
||||
});
|
||||
const data = await response.json();
|
||||
return data;
|
||||
};
|
Reference in New Issue
Block a user