♻️ refactor
This commit is contained in:
parent
553de1bcf7
commit
7351ad9c5d
5 changed files with 5 additions and 10 deletions
|
@ -1,10 +1,8 @@
|
|||
use crate::pages::html_fn::build_site;
|
||||
use crate::{config, pages};
|
||||
use actix_web::http::header;
|
||||
use actix_web::web::{Form, Json};
|
||||
use actix_web::web::Form;
|
||||
use actix_web::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::io::Read;
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct MessageForm {
|
||||
|
@ -21,9 +19,10 @@ pub async fn message_post(r: HttpRequest, f: Form<MessageForm>) -> impl Responde
|
|||
&format!("New Message from {}", f.msg_name.to_string()),
|
||||
"New Message",
|
||||
config.clone(),
|
||||
);
|
||||
)
|
||||
.await;
|
||||
return HttpResponse::Found()
|
||||
.header("Location", "/message")
|
||||
.append_header(("Location", "/message"))
|
||||
.finish();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue