FPSMS-frontend
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

17 righe
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. });