Add API_BASE and fix relative URL in AdminDiscordDiagnostic.tsx
cgen-1de474d30ce5415bb6f5b1bc86f2e952
This commit is contained in:
parent
b546c84bfa
commit
7a870ff3e8
1 changed files with 3 additions and 1 deletions
|
|
@ -1,4 +1,6 @@
|
|||
import { useState, useEffect } from "react";
|
||||
|
||||
const API_BASE = import.meta.env.VITE_API_BASE || "";
|
||||
import {
|
||||
AlertCircle,
|
||||
CheckCircle,
|
||||
|
|
@ -43,7 +45,7 @@ export default function AdminDiscordDiagnostic() {
|
|||
setLoading(true);
|
||||
setError(null);
|
||||
try {
|
||||
const response = await fetch("/api/discord/diagnostic");
|
||||
const response = await fetch(`${API_BASE}/api/discord/diagnostic`);
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP ${response.status}`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue