api 오류 수정

This commit is contained in:
dohyeons
2025-10-29 11:52:18 +09:00
parent f62af9077a
commit 8edd5e4ca6
10 changed files with 26 additions and 13 deletions

View File

@@ -6,6 +6,7 @@ import { Button } from "@/components/ui/button";
import { Badge } from "@/components/ui/badge";
import { RefreshCw, AlertTriangle, Cloud, Construction, Database as DatabaseIcon } from "lucide-react";
import { DashboardElement, ChartDataSource } from "@/components/admin/dashboard/types";
import { getApiUrl } from "@/lib/utils/apiUrl";
type AlertType = "accident" | "weather" | "construction" | "system" | "security" | "other";
@@ -138,7 +139,7 @@ export default function RiskAlertTestWidget({ element }: RiskAlertTestWidgetProp
console.log("🔍 원본 source.queryParams:", source.queryParams);
console.log("🔍 원본 source.headers:", source.headers);
const response = await fetch("http://localhost:8080/api/dashboards/fetch-external-api", {
const response = await fetch(getApiUrl("/api/dashboards/fetch-external-api"), {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({