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

@@ -2,6 +2,7 @@
import React, { useState, useEffect } from "react";
import { DashboardElement } from "@/components/admin/dashboard/types";
import { getApiUrl } from "@/lib/utils/apiUrl";
interface CargoListWidgetProps {
element: DashboardElement;
@@ -47,7 +48,7 @@ export default function CargoListWidget({ element }: CargoListWidgetProps) {
try {
setLoading(true);
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",