Fix GitHub API request for /explore.

Signed-off-by: Odyssey <odyssey346@disroot.org>
このコミットが含まれているのは:
Odyssey 2022-12-10 19:58:16 +01:00
コミット a44f9ebdb4

ファイルの表示

@ -20,7 +20,7 @@ type Items struct {
func HandleExplore(c *fiber.Ctx) error {
// get trending repos
trendingRepos := utils.GetRequest("https://api.github.com/search/repositories?q=code&sort=stars&order=desc&per_page=25")
bruh2 := trendingRepos.Get("tree").Array() // gjson.Result when I ask for an array. idiots, anyway so I have to do jank shit like this and I hate it. at least it works and is fast enough
bruh2 := trendingRepos.Get("items").Array() // gjson.Result when I ask for an array. idiots, anyway so I have to do jank shit like this and I hate it. at least it works and is fast enough
var trendingReposArray []Items
for _, item := range bruh2 {
trendingReposArray = append(trendingReposArray, Items{