Parse GIFs correctly

This commit is contained in:
spikecodes 2021-01-11 17:47:14 -08:00
parent 7a33ed3434
commit 541c741bde
4 changed files with 14 additions and 40 deletions

View file

@ -91,7 +91,7 @@ async fn parse_post(json: &serde_json::Value) -> Post {
score: format_num(score),
upvote_ratio: ratio as i64,
post_type,
thumbnail: format_url(val(post, "thumbnail")),
thumbnail: format_url(val(post, "thumbnail").as_str()),
flair: Flair(
val(post, "link_flair_text"),
val(post, "link_flair_background_color"),