From af3a348d993bf1aa96dc60e9a6b90b11ba97c7ac Mon Sep 17 00:00:00 2001 From: dragongoose Date: Sat, 29 Jul 2023 21:04:52 -0400 Subject: [PATCH] Pass cursor into function --- routes/api/discover/discover.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/routes/api/discover/discover.go b/routes/api/discover/discover.go index 233e107..2d5bb48 100644 --- a/routes/api/discover/discover.go +++ b/routes/api/discover/discover.go @@ -11,7 +11,8 @@ func Routes(route *gin.Engine) { auth := route.Group("/api/discover") auth.GET("", func(context *gin.Context) { - data, err := twitch.GetDiscoveryPage(50, "") + cursor := context.Query("cursor") + data, err := twitch.GetDiscoveryPage(50, cursor) if err != nil { context.Error(err) return @@ -21,7 +22,8 @@ func Routes(route *gin.Engine) { }) auth.GET("/:categoryName", func(context *gin.Context) { - data, err := twitch.GetDiscoveryItem(context.Param("categoryName"), 50, "") + cursor := context.Query("cursor") + data, err := twitch.GetDiscoveryItem(context.Param("categoryName"), 50, cursor) if err != nil { context.Error(err) return