From 31af77e7040670d30877d24976186f38b960f788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Tue, 19 Oct 2021 10:45:15 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SecuritySetting/notice/manager/Index.jsx | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/forge/SecuritySetting/notice/manager/Index.jsx b/src/forge/SecuritySetting/notice/manager/Index.jsx index ca16f25ec..5ba82d60c 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(