|
- import { cache } from "react";
- import "server-only";
- import { serverFetchJson } from "@/app/utils/fetchUtil";
- import { BASE_API_URL } from "@/config/api";
-
- export interface WarehouseResult {
- id: number
- code: string
- name: string
- description: string
- }
-
- export const fetchWarehouseList = cache(async () => {
- return serverFetchJson<WarehouseResult[]>(`${BASE_API_URL}/warehouse`, {
- next: { tags: ["warehouse"] },
- });
- });
|