mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 23:58:31 -06:00
workign on api errors
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import { fileStorageService } from "@/services/fileStorage/fileStorageService";
|
||||
import { withErrorHandling } from "@/services/withErrorHandling";
|
||||
|
||||
export async function GET(
|
||||
export const GET = async (
|
||||
_request: Request,
|
||||
{ params: { courseName } }: { params: { courseName: string } }
|
||||
) {
|
||||
const settings = await fileStorageService.getModuleNames(courseName)
|
||||
return Response.json(settings);
|
||||
}
|
||||
) =>
|
||||
await withErrorHandling(async () => {
|
||||
const settings = await fileStorageService.getModuleNames(courseName);
|
||||
return Response.json(settings);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user