fever item endpoint max_id parameter
This commit is contained in:
parent
b0364087ad
commit
0226c8da23
2 changed files with 13 additions and 1 deletions
|
|
@ -218,6 +218,13 @@ func FeverItemsHandler(rw http.ResponseWriter, req *http.Request) {
|
|||
}
|
||||
}
|
||||
|
||||
if _, ok := query["max_id"]; ok {
|
||||
idstr := query.Get("max_id")
|
||||
if idnum, err := strconv.ParseInt(idstr, 10, 64); err == nil {
|
||||
filter.MaxID = &idnum
|
||||
}
|
||||
}
|
||||
|
||||
items := db(req).ListItems(filter, 0, 50, true)
|
||||
|
||||
feverItems := make([]FeverItem, len(items))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue