From fdd66853f9f6fb6449efaba23d3c741d8fcc3fa4 Mon Sep 17 00:00:00 2001 From: video-prize-ranch Date: Wed, 26 Jan 2022 16:28:03 -0500 Subject: [PATCH] Switch to shared_with_community --- api/album.go | 6 +++--- views/gallery.hbs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/album.go b/api/album.go index 2635b05..9d808a9 100644 --- a/api/album.go +++ b/api/album.go @@ -27,10 +27,10 @@ func FetchAlbum(albumID string) (types.Album, error) { data := gjson.Parse(string(body)) album := types.Album{} - if data.Get("privacy").String() == "private" { - album, err = ParseAlbum(data) - } else { + if data.Get("shared_with_community").Bool() { album, err = FetchPosts(albumID) + } else { + album, err = ParseAlbum(data) } return album, err diff --git a/views/gallery.hbs b/views/gallery.hbs index 98544c7..afa0a53 100644 --- a/views/gallery.hbs +++ b/views/gallery.hbs @@ -26,10 +26,10 @@ visibility

{{album.Views}}

- {{#equal album.Privacy "public"}} + {{#if album.SharedWithCommunity}}

thumb_up {{album.Upvotes}}

thumb_down {{album.Downvotes}}

- {{/equal}} + {{/if}}