mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-12-14 12:15:22 +00:00
remove user comment pagination
?
This commit is contained in:
@@ -102,8 +102,8 @@ func (client *Client) FetchSubmissions(username string, sort string, page string
|
||||
return submissions, nil
|
||||
}
|
||||
|
||||
func (client *Client) FetchUserComments(username string, page string) ([]Comment, error) {
|
||||
cacheData, found := client.Cache.Get(username + "-usercomments-" + page)
|
||||
func (client *Client) FetchUserComments(username string) ([]Comment, error) {
|
||||
cacheData, found := client.Cache.Get(username + "-usercomments")
|
||||
if found {
|
||||
return cacheData.([]Comment), nil
|
||||
}
|
||||
@@ -150,7 +150,7 @@ func (client *Client) FetchUserComments(username string, page string) ([]Comment
|
||||
)
|
||||
wg.Wait()
|
||||
|
||||
client.Cache.Set(username+"-usercomments-"+page, comments, cache.DefaultExpiration)
|
||||
client.Cache.Set(username+"-usercomments", comments, cache.DefaultExpiration)
|
||||
return comments, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user