This commit is contained in:
JMARyA 2022-11-22 14:36:12 +01:00
parent 873b91f5fd
commit 2a47b83102
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
2 changed files with 48 additions and 22 deletions

View file

@ -3,6 +3,8 @@ mod msg;
mod notification;
mod pages;
use std::sync::{Arc, Mutex};
use actix_web::*;
#[actix_web::main]
@ -12,6 +14,7 @@ async fn main() -> std::io::Result<()> {
env_logger::init();
let conf = config::Config::new();
let csrf = Arc::new(Mutex::new(web_base::csrf::CSRF::new()));
web_base::cache_bootstrap().await;
@ -29,7 +32,7 @@ async fn main() -> std::io::Result<()> {
.service(pages::index::message_page)
.service(pages::index::message_post);
let app = web_base::bootstrap::assign_pages(app);
let app = web_base::assign_pages(csrf.clone(), app);
app
})