rename: requestPosting -> savePosting
This commit is contained in:
@@ -59,8 +59,8 @@ function ModifyPage({ sequential }: { sequential: string }) {
|
||||
},
|
||||
});
|
||||
|
||||
const { mutateAsync: requestPosting } = useMutation({
|
||||
mutationFn: (data: WithModePost[]) => PostingApi.requestPosting(data),
|
||||
const { mutateAsync: savePosting } = useMutation({
|
||||
mutationFn: (data: WithModePost[]) => PostingApi.savePosting(data),
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.POSTINGS, sequential],
|
||||
@@ -93,7 +93,7 @@ function ModifyPage({ sequential }: { sequential: string }) {
|
||||
setOnConfirm(true);
|
||||
if (await confirm("삭제하시겠습니까?")) {
|
||||
setOnConfirm(false);
|
||||
await requestPosting(data);
|
||||
await savePosting(data);
|
||||
alert("삭제되었습니다.");
|
||||
}
|
||||
setOnConfirm(false);
|
||||
|
||||
@@ -55,8 +55,8 @@ function ModifyPage({ sequential }: { sequential: string }) {
|
||||
},
|
||||
});
|
||||
|
||||
const { mutateAsync: requestPosting } = useMutation({
|
||||
mutationFn: (data: WithModePost[]) => PostingApi.requestPosting(data),
|
||||
const { mutateAsync: savePosting } = useMutation({
|
||||
mutationFn: (data: WithModePost[]) => PostingApi.savePosting(data),
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.POSTINGS, sequential],
|
||||
@@ -89,7 +89,7 @@ function ModifyPage({ sequential }: { sequential: string }) {
|
||||
setOnConfirm(true);
|
||||
if (await confirm("삭제하시겠습니까?")) {
|
||||
setOnConfirm(false);
|
||||
await requestPosting(data);
|
||||
await savePosting(data);
|
||||
alert("삭제되었습니다.");
|
||||
}
|
||||
setOnConfirm(false);
|
||||
|
||||
Reference in New Issue
Block a user