1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2024-11-22 22:35:06 +01:00

dspace_statistics_api/app.py: Fix Falcon 2.0 syntax

See: dspace_statistics_api/app.py
This commit is contained in:
Alan Orth 2019-03-17 23:23:23 +02:00
parent 9dcda114c6
commit 5a3b392a1d

View File

@ -14,8 +14,8 @@ class AllItemsResource:
def on_get(self, req, resp): def on_get(self, req, resp):
"""Handles GET requests""" """Handles GET requests"""
# Return HTTPBadRequest if id parameter is not present and valid # Return HTTPBadRequest if id parameter is not present and valid
limit = req.get_param_as_int("limit", min=0, max=100) or 100 limit = req.get_param_as_int("limit", min_value=0, max_value=100) or 100
page = req.get_param_as_int("page", min=0) or 0 page = req.get_param_as_int("page", min_value=0) or 0
offset = limit * page offset = limit * page
with DatabaseManager() as db: with DatabaseManager() as db: