mirror of
https://github.com/velocitatem/cvfs.git
synced 2026-05-31 08:43:37 +00:00
fix: correct default API_BASE_URL and improve sidebar error message
Agent-Logs-Url: https://github.com/velocitatem/cvfs/sessions/1a9aa3e0-c4e1-48fb-b646-49f31c316325 Co-authored-by: velocitatem <60182044+velocitatem@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
8bc501fa85
commit
0b38f9f703
@@ -4,7 +4,7 @@ import path from "node:path";
|
|||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
outputFileTracingRoot: path.join(process.cwd(), "../.."),
|
outputFileTracingRoot: path.join(process.cwd(), "../.."),
|
||||||
async rewrites() {
|
async rewrites() {
|
||||||
const backend = process.env.API_BASE_URL ?? "https://api.cv.alves.world";
|
const backend = process.env.API_BASE_URL ?? "http://localhost:9812";
|
||||||
return [{ source: "/api/:path*", destination: `${backend}/api/:path*` }];
|
return [{ source: "/api/:path*", destination: `${backend}/api/:path*` }];
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -495,7 +495,7 @@ export default function Dashboard() {
|
|||||||
setDocs(d);
|
setDocs(d);
|
||||||
if (d.length) { setSelectedDocId(d[0].id); setSelectedVersionId(d[0].root_version_id ?? null); }
|
if (d.length) { setSelectedDocId(d[0].id); setSelectedVersionId(d[0].root_version_id ?? null); }
|
||||||
})
|
})
|
||||||
.catch(e => setError(e.message))
|
.catch(() => setError('Failed to load documents. Make sure the backend is running.'))
|
||||||
.finally(() => setLoading(false));
|
.finally(() => setLoading(false));
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user