FPSMS-frontend
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

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