refactor
This commit is contained in:
parent
873b91f5fd
commit
2a47b83102
2 changed files with 48 additions and 22 deletions
|
@ -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
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue