From 4d4b7918726b4a56b87de8cdc577b6bf088c5f91 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 30 May 2021 03:37:16 +0200 Subject: main: If repo was updated, save new `updated_at` value If the repo was updated since we last cached it, update the `updated_at` column to the new value so we know that we fetched the latest. --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index e7be108..cbaec61 100644 --- a/src/main.rs +++ b/src/main.rs @@ -61,10 +61,10 @@ async fn main() { match db.repo_get(id).await { Ok(r) => { - // TODO: fetch - if db.repo_is_updated(&db_repo).await.unwrap() { - dbg!("UPDATED", &db_repo); + // TODO: fetch + + db.repo_update(&db_repo).await.unwrap(); } }, -- cgit v1.2.3