Skip to content

Commit

Permalink
handle case when no image
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur committed Apr 1, 2022
1 parent deb180b commit d23dec8
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app/api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,13 @@ func (s *Server) getFeedCtrl(w http.ResponseWriter, r *http.Request) {
if s.Conf.System.BaseURL != "" {
baseURL := s.Conf.System.BaseURL
rss.Link = baseURL + "/feed/" + feedName
rss.ItunesImage = feed.ItunesImg{
URL: baseURL + "/image/" + feedName,
}
rss.MediaThumbnail = feed.MediaThumbnail{
URL: baseURL + "/image/" + feedName,
if s.Conf.Feeds[feedName].Image != "" {
rss.ItunesImage = feed.ItunesImg{
URL: baseURL + "/image/" + feedName,
}
rss.MediaThumbnail = feed.MediaThumbnail{
URL: baseURL + "/image/" + feedName,
}
}
}

Expand Down

0 comments on commit d23dec8

Please sign in to comment.