feat: started repository abstraction

This commit is contained in:
Jef Roosens 2025-02-27 21:39:38 +01:00
parent d866d23efa
commit 952f92c178
No known key found for this signature in database
GPG key ID: 21FD3D77D56BAF49
8 changed files with 128 additions and 1 deletions

View file

@ -32,7 +32,10 @@ impl ServeCommand {
let pool = db::initialize_db(cli.data_dir.join(crate::DB_FILENAME), true).unwrap();
let ctx = server::Context { pool };
let ctx = server::Context {
pool: pool.clone(),
repo: db::SqliteRepository::from(pool.clone()),
};
let app = server::app(ctx);
let rt = tokio::runtime::Builder::new_multi_thread()