저장 시 toast 메시지 처리 적용

This commit is contained in:
changkyu choi 2024-09-24 17:41:08 +09:00
parent e078940a5b
commit 1a4145cb4a
2 changed files with 5 additions and 4 deletions

View File

@ -98,10 +98,11 @@ export default function FirstOption() {
// HTTP POST // HTTP POST
await post({ url: `/api/canvas-management/canvas-settings`, data: patternData }).then((res) => { await post({ url: `/api/canvas-management/canvas-settings`, data: patternData }).then((res) => {
toastUp({ message: res.returnMessage, type: 'success' }) //toastUp({ message: res.returnMessage, type: 'success' })
toastUp({ message: getMessage(res.returnMessage), type: 'success' })
}) })
} catch (error) { } catch (error) {
toastUp({ message: res.returnMessage, type: 'error' }) toastUp({ message: getMessage(res.returnMessage), type: 'error' })
} }
} }

View File

@ -98,10 +98,10 @@ export default function SecondOption() {
// HTTP POST // HTTP POST
await post({ url: `/api/canvas-management/canvas-settings`, data: patternData }).then((res) => { await post({ url: `/api/canvas-management/canvas-settings`, data: patternData }).then((res) => {
toastUp({ message: res.returnMessage, type: 'success' }) toastUp({ message: getMessage(res.returnMessage), type: 'success' })
}) })
} catch (error) { } catch (error) {
toastUp({ message: res.returnMessage, type: 'error' }) toastUp({ message: getMessage(res.returnMessage), type: 'error' })
} }
} }
return ( return (