fix
This commit is contained in:
parent
a91d8eebf4
commit
e1c45d6a45
1 changed files with 1 additions and 6 deletions
|
@ -15,12 +15,7 @@ pub struct MessageForm {
|
||||||
pub async fn message_post(r: HttpRequest, f: Form<MessageForm>) -> impl Responder {
|
pub async fn message_post(r: HttpRequest, f: Form<MessageForm>) -> impl Responder {
|
||||||
let config: &web::Data<config::Config> = r.app_data().expect("get config failed");
|
let config: &web::Data<config::Config> = r.app_data().expect("get config failed");
|
||||||
crate::msg::save_message(&f.message, &f.msg_name.to_string());
|
crate::msg::save_message(&f.message, &f.msg_name.to_string());
|
||||||
crate::notification::notify(
|
crate::notification::notify(&f.message, &f.msg_name, config.clone()).await;
|
||||||
&format!("New Message from {}", f.msg_name),
|
|
||||||
"New Message",
|
|
||||||
config.clone(),
|
|
||||||
)
|
|
||||||
.await;
|
|
||||||
web_base::func::redirect("/message")
|
web_base::func::redirect("/message")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue