FPSMS-frontend
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 

17 рядки
448 B

  1. import { cache } from "react";
  2. import "server-only";
  3. import { serverFetchJson } from "@/app/utils/fetchUtil";
  4. import { BASE_API_URL } from "@/config/api";
  5. export interface WarehouseResult {
  6. id: number
  7. code: string
  8. name: string
  9. description: string
  10. }
  11. export const fetchWarehouseList = cache(async () => {
  12. return serverFetchJson<WarehouseResult[]>(`${BASE_API_URL}/warehouse`, {
  13. next: { tags: ["warehouse"] },
  14. });
  15. });