cos tam dziala

This commit is contained in:
Patryk Koreń
2026-07-09 20:14:56 +02:00
parent ff707dd762
commit 65303e655b
18 changed files with 235 additions and 153 deletions

View File

@@ -0,0 +1,18 @@
import { useMutation } from "@tanstack/react-query";
export function useRefreshFiles() {
return useMutation({
mutationFn: async () => {
const res = await fetch(`${import.meta.env.VITE_API_URL}/protected/refreshfiles`, {
method: "POST",
credentials: "include",
});
if (!res.ok) {
throw new Error("Invalid credentials");
}
return res.json();
},
});
}