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.
 
 
 

20 rivejä
524 B

  1. "server only"
  2. import { BASE_API_URL } from '@/config/api';
  3. import { serverFetchJson } from '@/app/utils/fetchUtil';
  4. import { cache } from "react";
  5. export interface ShopCombo {
  6. id: number;
  7. value: number; // id
  8. label: string;
  9. }
  10. export const fetchSupplierCombo = cache(async() => {
  11. return serverFetchJson<ShopCombo[]>(`${BASE_API_URL}/shop/combo/supplier`, {
  12. method: "GET",
  13. headers: { "Content-Type": "application/json"},
  14. next: {
  15. tags: ["supplierCombo"]
  16. }
  17. })
  18. })