Fix GitHub API request for /explore.
Signed-off-by: Odyssey <odyssey346@disroot.org>
このコミットが含まれているのは:
コミット
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{
|
||||
|
読み込み中…
新しいイシューから参照
ユーザーをブロックする