Compare commits
2 commits
05f86dfd6b
...
af3a348d99
Author | SHA1 | Date | |
---|---|---|---|
af3a348d99 | |||
ed138fbe3e |
|
@ -111,7 +111,7 @@ func ParseCategory(data gjson.Result) (structs.CategoryPreview, error) {
|
|||
Viewers: int(data.Get("node.viewersCount").Int()),
|
||||
CreatedAt: data.Get("node.originalReleaseDate").Time(),
|
||||
Tags: parsedTags,
|
||||
Cursor: data.Get("node.cursor").String(),
|
||||
Cursor: data.Get("cursor").String(),
|
||||
Image: extractor.ProxyUrl(data.Get("node.avatarURL").String()),
|
||||
}, nil
|
||||
}
|
||||
|
|
|
@ -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