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.
 
 

18 lines
445 B

  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. };