취소 비밀번호 변경 기능 추가 및 사용자 계정 관리 개선
🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
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 { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
ChangeCancelPasswordParams,
|
||||
ChangeCancelPasswordResponse
|
||||
} from '../model/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
|
||||
export const userChangeCancelPassword = (params: ChangeCancelPasswordParams) => {
|
||||
return resultify(
|
||||
axios.post<ChangeCancelPasswordResponse>(API_URL_USER.userChangeCancelPassword(), params),
|
||||
);
|
||||
};
|
||||
|
||||
export const useUserChangeCancelPasswordMutation = (options?: UseMutationOptions<ChangeCancelPasswordResponse, CBDCAxiosError, ChangeCancelPasswordParams>) => {
|
||||
const mutation = useMutation<ChangeCancelPasswordResponse, CBDCAxiosError, ChangeCancelPasswordParams>({
|
||||
...options,
|
||||
mutationFn: (params: ChangeCancelPasswordParams) => userChangeCancelPassword(params),
|
||||
});
|
||||
|
||||
return {
|
||||
...mutation,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user