세금 계산서 및 달력 월 형태 수정
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import axios from 'axios';
|
||||
import { API_URL_USER } from '@/shared/api/api-url-user';
|
||||
import { resultify } from '@/shared/lib/resultify';
|
||||
import { NiceAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
BusinessPropertyByMidParams,
|
||||
BusinessPropertyByMidResponse
|
||||
} from '../model/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const businessPropertyByMid = (params: BusinessPropertyByMidParams) => {
|
||||
return resultify(
|
||||
axios.post<BusinessPropertyByMidResponse>(API_URL_USER.businessPropertyByMid(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useBusinessPropertyByMidMutation = (options?: UseMutationOptions<BusinessPropertyByMidResponse, NiceAxiosError, BusinessPropertyByMidParams>) => {
|
||||
const mutation = useMutation<BusinessPropertyByMidResponse, NiceAxiosError, BusinessPropertyByMidParams>({
|
||||
...options,
|
||||
mutationFn: (params: BusinessPropertyByMidParams) => businessPropertyByMid(params),
|
||||
});
|
||||
|
||||
return {
|
||||
...mutation,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user