mirror of
https://codeberg.org/SafeTwitch/safetwitch-backend.git
synced 2024-12-22 05:02:58 -05:00
Pass cursor into function
This commit is contained in:
parent
ed138fbe3e
commit
af3a348d99
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue