feat: started repository abstraction
This commit is contained in:
parent
d866d23efa
commit
952f92c178
8 changed files with 128 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue