forked from Gitlink/forgeplus-react
通知管理
This commit is contained in:
parent
6ff27a559f
commit
31af77e704
|
@ -23,6 +23,19 @@ function NoticeManager(props){
|
||||||
notification_body:notification_body,
|
notification_body:notification_body,
|
||||||
email_body:email_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);
|
setSettingTypes(response.data.setting_types);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
axios.get(`/users/${current_user.login}/template_message_settings.json`).then((response)=>{
|
getUserSettings();
|
||||||
if(response && response.status === 200 ){
|
|
||||||
setUserEmail(response.data.email_body);
|
|
||||||
setUserNotification(response.data.notification_body);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},[])
|
},[])
|
||||||
|
|
||||||
return(
|
return(
|
||||||
|
|
Loading…
Reference in New Issue