Add API_BASE and fix URL in discord-bot-status.ts

cgen-53c6cdaa8201491c839b0f5b69adb1dd
This commit is contained in:
Builder.io 2025-11-13 02:55:33 +00:00
parent a5e4dab0f3
commit dd76c5bcdf
2 changed files with 5 additions and 1 deletions

View file

@ -4,6 +4,8 @@ import {
aethexNotificationService,
} from "@/lib/aethex-database-adapter";
const API_BASE = import.meta.env.VITE_API_BASE || "";
export type TeamVisibility = "public" | "private";
export type MembershipRole = "owner" | "admin" | "member";
export type ProjectRole = "owner" | "manager" | "contributor" | "viewer";

View file

@ -1,3 +1,5 @@
const API_BASE = import.meta.env.VITE_API_BASE || "";
export interface BotHealthStatus {
status: "online" | "offline";
guilds: number;
@ -9,7 +11,7 @@ export interface BotHealthStatus {
export async function checkBotHealth(): Promise<BotHealthStatus> {
try {
const response = await fetch("/api/discord/bot-health", {
const response = await fetch(`${API_BASE}/api/discord/bot-health`, {
method: "GET",
headers: {
"Content-Type": "application/json",