moving to server actions

This commit is contained in:
2024-10-29 12:12:01 -06:00
parent e17ad6f783
commit f74e53fe10
8 changed files with 110 additions and 13 deletions

View File

@@ -1,6 +1,7 @@
import { LocalAssignment } from "@/models/local/assignment/localAssignment";
import { fileStorageService } from "@/services/fileStorage/fileStorageService";
import { withErrorHandling } from "@/services/withErrorHandling";
import { revalidatePath } from "next/cache";
export const GET = async (
_request: Request,

View File

@@ -1,9 +1,9 @@
import { fileStorageService } from "@/services/fileStorage/fileStorageService";
import { withErrorHandling } from "@/services/withErrorHandling";
export const GET = async () =>
await withErrorHandling(async () => {
const directories = await fileStorageService.getEmptyDirectories();
return Response.json(directories);
});
// export const GET = async () =>
// await withErrorHandling(async () => {
// const directories = await fileStorageService.getEmptyDirectories();
// return Response.json(directories);
// });