This commit is contained in:
JMARyA 2024-03-17 18:23:29 +01:00
parent a91d8eebf4
commit e1c45d6a45
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263

View file

@ -15,12 +15,7 @@ pub struct MessageForm {
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");
crate::msg::save_message(&f.message, &f.msg_name.to_string());
crate::notification::notify(
&format!("New Message from {}", f.msg_name),
"New Message",
config.clone(),
)
.await;
crate::notification::notify(&f.message, &f.msg_name, config.clone()).await;
web_base::func::redirect("/message")
}