Remove viper and file configuration

This commit is contained in:
video-prize-ranch
2022-04-22 11:55:53 -04:00
parent 4a41e59d34
commit 088f46a5bb
10 changed files with 62 additions and 82 deletions

View File

@@ -11,7 +11,6 @@ import (
"codeberg.org/video-prize-ranch/rimgo/utils"
"github.com/dustin/go-humanize"
"github.com/patrickmn/go-cache"
"github.com/spf13/viper"
"github.com/tidwall/gjson"
)
@@ -23,7 +22,7 @@ func FetchComments(galleryID string) ([]types.Comment, error) {
return cacheData.([]types.Comment), nil
}
res, err := http.Get("https://api.imgur.com/comment/v1/comments?client_id=" + viper.GetString("RIMGU_IMGUR_CLIENT_ID") + "&filter[post]=eq:" + galleryID + "&include=account,adconfig&per_page=30&sort=best")
res, err := http.Get("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")
if err != nil {
return []types.Comment{}, err
}