fix(frontend): correct proxy path to /api/proxy/api/ for fetch calls

The Next.js proxy at /api/proxy/[...path] forwards the path to
AGPT_SERVER_URL which already includes /api. So the path needs
/api/proxy/api/... (double api — one for proxy route, one for backend).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Zamil Majdy
2026-03-28 16:47:29 +00:00
parent a85ba9e36d
commit 264869cab9
2 changed files with 2 additions and 2 deletions

View File

@@ -86,7 +86,7 @@ export function useRateLimitManager() {
try {
const response = await fetch(
`/api/proxy/copilot/admin/rate_limit/search_users?query=${encodeURIComponent(trimmed)}&limit=20`,
`/api/proxy/api/copilot/admin/rate_limit/search_users?query=${encodeURIComponent(trimmed)}&limit=20`,
);
if (!response.ok) {
throw new Error("Failed to search users");
@@ -181,7 +181,7 @@ export function useRateLimitManager() {
async function handleTierChange(newTier: string) {
if (!rateLimitData) return;
const response = await fetch("/api/proxy/copilot/admin/rate_limit/tier", {
const response = await fetch("/api/proxy/api/copilot/admin/rate_limit/tier", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB