feat: with persistent state

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2023-05-28 15:37:46 +02:00
parent 746fb68684
commit b3af0be6b5
Signed by: kjuulh
GPG Key ID: 57B6E1465221F912

View File

@ -30,6 +30,8 @@ impl ServiceRegister {
let user_service = Arc::new(DefaultUserService::new(pool.clone())) as DynUserService; let user_service = Arc::new(DefaultUserService::new(pool.clone())) as DynUserService;
let store = PostgresSessionStore::new(&config.database_url).await?; let store = PostgresSessionStore::new(&config.database_url).await?;
store.migrate().await?;
info!("services created succesfully"); info!("services created succesfully");
Ok(Self { Ok(Self {