This commit is contained in:
2024-10-28 20:33:40 -06:00
parent cf85b63561
commit e17ad6f783
2 changed files with 13 additions and 5 deletions

View File

@@ -8,9 +8,10 @@ export const directoryKeys = {
export const useEmptyDirectoriesQuery = () =>
useSuspenseQuery({
queryKey: directoryKeys.emptyFolders,
queryFn: async () => {
const url = "/api/directories/empty";
const { data } = await axiosClient.get<string[]>(url);
return data;
},
queryFn: getEmptyDirectories
// async () => {
// const url = "/api/directories/empty";
// const { data } = await axiosClient.get<string[]>(url);
// return data;
// },
});

View File

@@ -0,0 +1,7 @@
"use server"
import { fileStorageService } from "@/services/fileStorage/fileStorageService"
export async function getEmptyDirectories() {
return await fileStorageService.getEmptyDirectories()
}