fix butler

This commit is contained in:
Nikita Galaiko 2023-10-06 15:58:23 +02:00 committed by GitButler
parent 0d82e470ba
commit b1f3e2439e

View File

@ -19,9 +19,8 @@ impl App {
let local_data_dir = find_local_data_dir().context("could not find local data dir")?; let local_data_dir = find_local_data_dir().context("could not find local data dir")?;
let storage = storage::Storage::from(&local_data_dir); let storage = storage::Storage::from(&local_data_dir);
let users_storage = users::Storage::from(&storage); let users_storage = users::Controller::from(&storage);
let projects_storage = projects::Controller::try_from(&local_data_dir)?;
let projects_storage = projects::Storage::try_from(&storage)?;
let projects = projects_storage.list().context("failed to list projects")?; let projects = projects_storage.list().context("failed to list projects")?;
let project = projects let project = projects
@ -29,7 +28,7 @@ impl App {
.find(|p| p.path == path) .find(|p| p.path == path)
.context("failed to find project")?; .context("failed to find project")?;
let user = users_storage.get().context("failed to get user")?; let user = users_storage.get_user().context("failed to get user")?;
let db_path = std::path::Path::new(&local_data_dir).join("database.sqlite3"); let db_path = std::path::Path::new(&local_data_dir).join("database.sqlite3");
let database = database::Database::try_from(&db_path).context("failed to open database")?; let database = database::Database::try_from(&db_path).context("failed to open database")?;
let sessions_db = sessions::Database::from(database); let sessions_db = sessions::Database::from(database);