Code fixes and add events

This commit is contained in:
Adrian Woźniak 2023-12-29 16:33:38 +01:00
parent e054860091
commit 2ea0003158
2 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,6 @@
pub struct SharedResources {
#[cfg(feature = "web")]
web: web::Web,
#[cfg(feature = "events")]
events: events::Bus,
}

View File

@ -28,7 +28,7 @@ pub trait DatabaseUrl {
pub async fn run_migration<Migrator: sea_orm_migration::prelude::MigrationTrait + Default>(
opts: &impl DatabaseUrl,
) {
let connection = sea_orm::Database::connect(opts.database_url())
let _connection = db_connect(&opts.database_url())
.await
.expect("Failed to connect to database");
// Migrator ::default().up(&connection)