공통코드
This commit is contained in:
@@ -22,12 +22,12 @@ export const codesSelect = ({
|
||||
}: CodesSelectParams) => {
|
||||
if(method === 'get'){
|
||||
return resultify(
|
||||
axios.get<CodesSelectGetResponse>(API_URL.codesSelect()),
|
||||
axios.get<CodesSelectGetResponse & CodesSelectPostResponse>(API_URL.codesSelect()),
|
||||
);
|
||||
}
|
||||
else{
|
||||
return resultify(
|
||||
axios.post<CodesSelectPostResponse>(API_URL.codesSelect(), {
|
||||
axios.post<CodesSelectGetResponse & CodesSelectPostResponse>(API_URL.codesSelect(), {
|
||||
codeCl,
|
||||
colNm,
|
||||
code1,
|
||||
@@ -38,8 +38,8 @@ export const codesSelect = ({
|
||||
}
|
||||
};
|
||||
|
||||
export const useCodesSelectMutation = (options?: UseMutationOptions<CodesSelectGetResponse | CodesSelectPostResponse, CBDCAxiosError, CodesSelectParams>) => {
|
||||
const mutation = useMutation<CodesSelectGetResponse | CodesSelectPostResponse, CBDCAxiosError, CodesSelectParams>({
|
||||
export const useCodesSelectMutation = (options?: UseMutationOptions<CodesSelectGetResponse & CodesSelectPostResponse, CBDCAxiosError, CodesSelectParams>) => {
|
||||
const mutation = useMutation<CodesSelectGetResponse & CodesSelectPostResponse, CBDCAxiosError, CodesSelectParams>({
|
||||
...options,
|
||||
mutationFn: ({
|
||||
codeCl,
|
||||
|
||||
Reference in New Issue
Block a user