♻️ refactor

This commit is contained in:
JMARyA 2022-11-12 02:31:09 +01:00
parent 553de1bcf7
commit 7351ad9c5d
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
5 changed files with 5 additions and 10 deletions

View file

@ -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();
}