fix(auth): remove rest of todos for hot path
Some checks failed
continuous-integration/drone/push Build is failing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2023-08-20 16:29:07 +02:00
parent 7a71f9b106
commit 1f13172ec0
4 changed files with 37 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
use std::sync::Arc;
use async_sqlx_session::PostgresSessionStore;
use como_auth::AuthService;
use como_auth::{AuthService, SessionService};
use como_core::{items::DynItemService, projects::DynProjectService, users::DynUserService};
use tracing::log::info;
@@ -28,7 +28,8 @@ impl ServiceRegister {
pub async fn new(pool: ConnectionPool, config: Arc<AppConfig>) -> anyhow::Result<Self> {
info!("creating services");
let auth = AuthService::new(&config.auth).await?;
let session = SessionService::new(&config.auth).await?;
let auth = AuthService::new(&config.auth, session).await?;
let s = match config.database_type {
DatabaseType::Postgres => {