mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2026-01-28 09:31:13 +00:00
implement random gallery (#245)
closes #229 Reviewed-on: https://codeberg.org/rimgo/rimgo/pulls/245 Co-authored-by: orangix <uleo8b8g@anonaddy.me> Co-committed-by: orangix <uleo8b8g@anonaddy.me>
This commit is contained in:
committed by
video-prize-ranch
parent
33fa04e98d
commit
61a312aba0
@@ -36,6 +36,8 @@ func (client *Client) FetchTrending(section, sort, page string) ([]Submission, e
|
||||
case "best":
|
||||
q.Add("filter[window]", "all")
|
||||
q.Add("sort", "-top")
|
||||
case "random":
|
||||
q.Add("sort", "random")
|
||||
case "popular":
|
||||
fallthrough
|
||||
default:
|
||||
@@ -51,6 +53,8 @@ func (client *Client) FetchTrending(section, sort, page string) ([]Submission, e
|
||||
case "top":
|
||||
q.Add("filter[section]", "eq:top")
|
||||
q.Add("filter[window]", "day")
|
||||
case "random":
|
||||
q.Add("filter[section]", "eq:random")
|
||||
default:
|
||||
q.Add("filter[section]", "eq:hot")
|
||||
section = "hot"
|
||||
|
||||
Reference in New Issue
Block a user