FPSMS-frontend
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

actions.ts 673 B

3 hafta önce
12345678910111213141516171819202122232425
  1. "use server";
  2. import { serverFetchString } from "@/app/utils/fetchUtil";
  3. import { BASE_API_URL } from "@/config/api";
  4. export const importWarehouse = async (data: FormData) => {
  5. const importWarehouse = await serverFetchString<string>(
  6. `${BASE_API_URL}/warehouse/import`,
  7. {
  8. method: "POST",
  9. body: data,
  10. },
  11. );
  12. return importWarehouse;
  13. }
  14. export const importNewWarehouse = async (data: FormData) => {
  15. const importWarehouse = await serverFetchString<string>(
  16. `${BASE_API_URL}/warehouse/importNew`,
  17. {
  18. method: "POST",
  19. body: data,
  20. },
  21. );
  22. return importWarehouse;
  23. }