mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-12-13 11:45:18 +00:00
Add image cache and use struct for config (closes #58)
This commit is contained in:
@@ -33,7 +33,7 @@ func FetchComments(galleryID string) ([]Comment, error) {
|
||||
return cacheData.([]Comment), nil
|
||||
}
|
||||
|
||||
data, err := utils.GetJSON("https://api.imgur.com/comment/v1/comments?client_id=" + utils.Config["imgurId"].(string) + "&filter[post]=eq:" + galleryID + "&include=account,adconfig&per_page=30&sort=best")
|
||||
data, err := utils.GetJSON("https://api.imgur.com/comment/v1/comments?client_id=" + utils.Config.ImgurId + "&filter[post]=eq:" + galleryID + "&include=account,adconfig&per_page=30&sort=best")
|
||||
if err != nil {
|
||||
return []Comment{}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user