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 445 B

1234567891011121314151617
  1. "use server";
  2. import { serverFetchJson } from "@/app/utils/fetchUtil";
  3. import { BASE_API_URL } from "@/config/api";
  4. export interface CreateQcCategoryInputs {
  5. code: string;
  6. name: string;
  7. }
  8. export const saveQcCategory = async (data: CreateQcCategoryInputs) => {
  9. return serverFetchJson(`${BASE_API_URL}/qcCategories/save`, {
  10. method: "POST",
  11. body: JSON.stringify(data),
  12. headers: { "Content-Type": "application/json" },
  13. });
  14. };