argon2
Some checks failed
ci/woodpecker/push/check_fmt Pipeline failed

This commit is contained in:
Sphereso 2025-04-01 12:30:50 +02:00
parent db23c11875
commit 4e8a4f06c9
2 changed files with 4 additions and 0 deletions

View file

@ -13,6 +13,8 @@ actix-cors = "0.7"
actix-files = "0.6"
tracing-actix-web = "0.7.16"
argon2 = "0.5.3"
env_logger = "0.11"
serde = {version = "1", features = ["derive"]}

View file

@ -1,6 +1,7 @@
use actix_files::NamedFile;
use actix_session::{storage::RedisSessionStore, SessionMiddleware};
use actix_web::{cookie::Key, middleware::Logger, web, App, HttpResponse, HttpServer};
use argon2::Argon2;
use db::Database;
use std::env;
@ -25,6 +26,7 @@ async fn main() -> std::io::Result<()> {
HttpServer::new(move || {
let app = App::new()
.app_data(web::Data::new(database.clone()))
.app_data(web::Data::new(Argon2::default()))
.wrap(Logger::default())
.wrap(SessionMiddleware::new(
redis_conn.clone(),