通知管理

This commit is contained in:
谢思 2021-10-19 10:45:15 +08:00
parent 6ff27a559f
commit 31af77e704
1 changed files with 14 additions and 6 deletions

View File

@ -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(