This commit is contained in:
JMARyA 2023-07-04 19:08:56 +02:00
parent 6d55f0ff92
commit 2b903cccda
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
4 changed files with 398 additions and 357 deletions

View file

@ -14,7 +14,7 @@ pub struct MessageForm {
#[post("/message")]
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.clone(), &f.msg_name.to_string());
crate::msg::save_message(&f.message, &f.msg_name.to_string());
crate::notification::notify(
&format!("New Message from {}", f.msg_name),
"New Message",