aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorTeddy Wing2021-05-30 03:37:16 +0200
committerTeddy Wing2021-05-30 03:38:46 +0200
commit4d4b7918726b4a56b87de8cdc577b6bf088c5f91 (patch)
tree1d8a71ecd64cf6f2b42c57db37b6d7d3c97b3955 /src/main.rs
parenta879ee3ff4b73a013eb9303e5790c2a9df0a4f5b (diff)
downloadreflectub-4d4b7918726b4a56b87de8cdc577b6bf088c5f91.tar.bz2
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.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 3 insertions, 3 deletions
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();
}
},