feat(admin): users and roles added to the frontend to manage easier

This commit is contained in:
2025-10-15 21:16:14 -05:00
parent 817a5c6876
commit 2142c06ac3
14 changed files with 856 additions and 230 deletions

View File

@@ -0,0 +1,17 @@
import { queryOptions } from "@tanstack/react-query";
import axios from "axios";
export function getUsers() {
return queryOptions({
queryKey: ["getUsers"],
queryFn: () => fetchSession(),
staleTime: 5000,
refetchOnWindowFocus: true,
});
}
const fetchSession = async () => {
const { data } = await axios.post("/lst/api/admin/users");
return data.data;
};