diff --git a/src/forge/SecuritySetting/notice/manager/Index.jsx b/src/forge/SecuritySetting/notice/manager/Index.jsx index ca16f25e..5ba82d60 100644 --- a/src/forge/SecuritySetting/notice/manager/Index.jsx +++ b/src/forge/SecuritySetting/notice/manager/Index.jsx @@ -23,6 +23,19 @@ function NoticeManager(props){ notification_body:notification_body, email_body:email_body } + }).then(response=>{ + if(response && response.status === 0){ + getUserSettings(); + } + }) + } + + function getUserSettings(){ + axios.get(`/users/${current_user.login}/template_message_settings.json`).then((response)=>{ + if(response && response.status === 200 ){ + setUserEmail(response.data.email_body); + setUserNotification(response.data.notification_body); + } }) } @@ -32,12 +45,7 @@ function NoticeManager(props){ setSettingTypes(response.data.setting_types); } }) - axios.get(`/users/${current_user.login}/template_message_settings.json`).then((response)=>{ - if(response && response.status === 200 ){ - setUserEmail(response.data.email_body); - setUserNotification(response.data.notification_body); - } - }) + getUserSettings(); },[]) return(