260806_01_ENH: 문자 템플릿 저장 json에서 form 방식으로 교체
This commit is contained in:
@@ -39,8 +39,15 @@ export function useNotificationTemplatesQuery(templateIdxList: number[], enabled
|
||||
|
||||
export function useSaveNotificationTemplateMutation() {
|
||||
return useMutation({
|
||||
mutationFn: (data: SaveTemplateRequest) =>
|
||||
nextApi.patch<Template>("/notification/template", data),
|
||||
mutationFn: (data: SaveTemplateRequest) => {
|
||||
const formData = new FormData();
|
||||
formData.append(
|
||||
"template",
|
||||
new Blob([JSON.stringify(data)], {type: "application/json"})
|
||||
);
|
||||
|
||||
return nextApi.patchForm<Template>("/notification/template", formData);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user