refactor: moved auth business logic outside of db using store abstraction
This commit is contained in:
parent
3f0e01aaf6
commit
b1fa048081
8 changed files with 179 additions and 21 deletions
|
|
@ -6,9 +6,11 @@ pub fn serve(config: &crate::config::Config) -> u8 {
|
|||
tracing::info!("Initializing database and running migrations");
|
||||
|
||||
let pool = db::initialize_db(config.data_dir.join(crate::DB_FILENAME), true).unwrap();
|
||||
let repo = db::SqliteRepository::from(pool);
|
||||
|
||||
let ctx = server::Context {
|
||||
repo: db::SqliteRepository::from(pool),
|
||||
repo: repo.clone(),
|
||||
store: crate::gpodder::GpodderRepository::new(Box::new(repo)),
|
||||
};
|
||||
let app = server::app(ctx);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue