mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
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:
@@ -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({
|
||||
|
||||
BIN
test-results/PR-12594-round4/01-search-zamil-multiple.png
Normal file
BIN
test-results/PR-12594-round4/01-search-zamil-multiple.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
Reference in New Issue
Block a user