refactor
This commit is contained in:
parent
6d55f0ff92
commit
2b903cccda
4 changed files with 398 additions and 357 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue