aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/sync.rs
blob: facbe57807e9826b52bcdca66a5ce0f5b460c88e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use eyre::Result;

use crate::local::database::Database;
use crate::local::sync;
use crate::settings::Settings;

pub fn run(settings: &Settings, force: bool, db: &mut impl Database) -> Result<()> {
    sync::sync(settings, force, db)?;
    println!(
        "Sync complete! {} items in database, force: {}",
        db.history_count()?,
        force
    );
    Ok(())
}