From 451c3b5c88b7352635a89f0be6915a2ca9caaea0 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Thu, 18 Feb 2021 11:34:35 +0900 Subject: [PATCH] Add TODO comments --- plume-models/src/medias.rs | 2 ++ plume-models/src/posts.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/plume-models/src/medias.rs b/plume-models/src/medias.rs index 369df668..e0fffb62 100644 --- a/plume-models/src/medias.rs +++ b/plume-models/src/medias.rs @@ -212,6 +212,7 @@ impl Media { } let mut dest = fs::File::create(path.clone()).ok()?; + // TODO: conditional GET if let Some(proxy) = CONFIG.proxy() { reqwest::ClientBuilder::new().proxy(proxy.clone()).build()? } else { @@ -223,6 +224,7 @@ impl Media { .copy_to(&mut dest) .ok()?; + // TODO: upsert Media::insert( conn, NewMedia { diff --git a/plume-models/src/posts.rs b/plume-models/src/posts.rs index 8f1df2fe..dc0c2a56 100644 --- a/plume-models/src/posts.rs +++ b/plume-models/src/posts.rs @@ -644,6 +644,7 @@ impl FromId for Post { .and_then(|img| Media::from_activity(conn, &img).ok().map(|m| m.id)); let title = article.object_props.name_string()?; + // TODO: upsert let post = Post::insert( conn, NewPost {