File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,12 @@ func HandleURL(w http.ResponseWriter, r *http.Request) {
229
229
}
230
230
231
231
func HandleNonNumericCursor (w http.ResponseWriter , r * http.Request ) {
232
+ vals , ok := r .URL .Query ()["endCursor" ]
233
+ var endCursor * string
234
+ if ok && len (vals ) > 0 {
235
+ endCursor = & vals [0 ]
236
+ }
237
+
232
238
limit := 15
233
239
234
240
queryCursor := r .FormValue ("cursor" )
@@ -249,10 +255,11 @@ func HandleNonNumericCursor(w http.ResponseWriter, r *http.Request) {
249
255
res .ResultArray = append (res .ResultArray , unhash (i ))
250
256
}
251
257
252
- // output cursor to $.cursor in addition to $.resultArray[(@.length-1)]
253
258
if len (res .ResultArray ) == limit {
254
259
cursor , _ := res .ResultArray [len (res .ResultArray )- 1 ].(string )
255
260
res .Cursor = & cursor
261
+ } else if endCursor != nil {
262
+ res .Cursor = endCursor
256
263
}
257
264
258
265
w .Header ().Set ("Content-Type" , "application/json" )
@@ -262,6 +269,7 @@ func HandleNonNumericCursor(w http.ResponseWriter, r *http.Request) {
262
269
}
263
270
}
264
271
272
+
265
273
func HandleLimitOffsetDeepOutputsPage (w http.ResponseWriter , r * http.Request ) {
266
274
queryLimit := r .FormValue ("limit" )
267
275
queryPage := r .FormValue ("page" )
You can’t perform that action at this time.
0 commit comments