getApiUrl 사용

This commit is contained in:
dohyeons
2025-10-24 16:08:57 +09:00
parent 9a9133bbfd
commit 4b52fe6394
14 changed files with 245 additions and 169 deletions

View File

@@ -9,6 +9,7 @@
import React, { useState, useEffect } from "react";
import { DashboardElement } from "@/components/admin/dashboard/types";
import { getApiUrl } from "@/lib/utils/apiUrl";
interface CustomStatsWidgetProps {
element?: DashboardElement;
@@ -77,7 +78,7 @@ export default function CustomStatsWidget({ element, refreshInterval = 60000 }:
// 쿼리 실행하여 통계 계산
const token = localStorage.getItem("authToken");
const response = await fetch("/api/dashboards/execute-query", {
const response = await fetch(getApiUrl("/api/dashboards/execute-query"), {
method: "POST",
headers: {
"Content-Type": "application/json",