this repo has no description

refactor(feedweb): make it more clear when response gets a cursor

Changed files
+3 -3
+3 -3
feedweb.py
···
posts = feed_manager.serve_feed(feed_uri, limit, offset, langs, debug=False)
-
if len(posts) == limit:
offset += len(posts)
return dict(cursor=str(offset), feed=[dict(post=uri) for uri in posts])
-
else:
-
return dict(feed=[dict(post=uri) for uri in posts])
app.wsgi_app = DispatcherMiddleware(app.wsgi_app, {
'/metrics': make_wsgi_app()
···
posts = feed_manager.serve_feed(feed_uri, limit, offset, langs, debug=False)
+
if len(posts) < limit:
+
return dict(feed=[dict(post=uri) for uri in posts])
+
else:
offset += len(posts)
return dict(cursor=str(offset), feed=[dict(post=uri) for uri in posts])
app.wsgi_app = DispatcherMiddleware(app.wsgi_app, {
'/metrics': make_wsgi_app()