FPSMS-frontend
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

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