From a44f9ebdb4968e39a28a9d2b630b9c180aa67dc8 Mon Sep 17 00:00:00 2001 From: Odyssey Date: Sat, 10 Dec 2022 19:58:16 +0100 Subject: [PATCH] Fix GitHub API request for /explore. Signed-off-by: Odyssey --- pages/explore.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/explore.go b/pages/explore.go index 9d9b364..d038b43 100644 --- a/pages/explore.go +++ b/pages/explore.go @@ -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{