import { httpGetRequest, httpPostRequest, APIUrlGenerator } from "@/utils/baseHttpService";
import { API_ROUTES } from "@/constant/routes";
import {
  AutoVerifySettingResponse,
  UpdateAutoVerifySettingRequest,
} from "./_models";

export const getAutoVerifySetting = async (): Promise<AutoVerifySettingResponse> => {
  const response = await httpGetRequest<AutoVerifySettingResponse>(
    APIUrlGenerator(API_ROUTES.GET_AUTO_VERIFY_SETTING)
  );
  return response.data;
};

export const updateAutoVerifySetting = async (
  data: UpdateAutoVerifySettingRequest
): Promise<AutoVerifySettingResponse> => {
  const response = await httpPostRequest<AutoVerifySettingResponse>(
    APIUrlGenerator(API_ROUTES.UPDATE_AUTO_VERIFY_SETTING),
    data
  );
  return response.data;
};
