This commit is contained in:
urieljarethbusiness-cpu
2026-05-17 12:13:45 -06:00
parent b964fcb2e6
commit 1ec4a37fde
2 changed files with 8 additions and 7 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
export const API_URL = process.env.NEXT_PUBLIC_API_URL ?? "http://127.0.0.1:8000";
const configuredApiUrl = process.env.NEXT_PUBLIC_API_URL;
export const API_URL = configuredApiUrl === undefined ? "http://127.0.0.1:8000" : configuredApiUrl || "/api";
export type Subject = { id: number; name: string; slug: string; created_at: string };
export type Week = { id: number; subject_id: number; number: number; title?: string | null; created_at: string };
+6 -6
View File
@@ -5,12 +5,12 @@ const nextConfig = {
output: "standalone",
async rewrites() {
return [
{ source: "/health", destination: `${backendUrl}/health` },
{ source: "/settings/:path*", destination: `${backendUrl}/settings/:path*` },
{ source: "/subjects/:path*", destination: `${backendUrl}/subjects/:path*` },
{ source: "/sources/:path*", destination: `${backendUrl}/sources/:path*` },
{ source: "/documents/:path*", destination: `${backendUrl}/documents/:path*` },
{ source: "/jobs/:path*", destination: `${backendUrl}/jobs/:path*` },
{ source: "/api/health", destination: `${backendUrl}/health` },
{ source: "/api/settings/:path*", destination: `${backendUrl}/settings/:path*` },
{ source: "/api/subjects/:path*", destination: `${backendUrl}/subjects/:path*` },
{ source: "/api/sources/:path*", destination: `${backendUrl}/sources/:path*` },
{ source: "/api/documents/:path*", destination: `${backendUrl}/documents/:path*` },
{ source: "/api/jobs/:path*", destination: `${backendUrl}/jobs/:path*` },
];
},
};