diff --git a/dspace_statistics_api/app.py b/dspace_statistics_api/app.py index 009ee88..0d946df 100644 --- a/dspace_statistics_api/app.py +++ b/dspace_statistics_api/app.py @@ -17,7 +17,7 @@ class AllItemsResource: def on_get(self, req, resp): """Handles GET requests""" # Return HTTPBadRequest if id parameter is not present and valid - limit = req.get_param_as_int("limit", min_value=0, max_value=100) or 100 + limit = req.get_param_as_int("limit", min_value=1, max_value=100) or 100 page = req.get_param_as_int("page", min_value=0) or 0 offset = limit * page diff --git a/dspace_statistics_api/util.py b/dspace_statistics_api/util.py index 45fda51..50c349c 100644 --- a/dspace_statistics_api/util.py +++ b/dspace_statistics_api/util.py @@ -108,7 +108,7 @@ def validate_items_post_parameters(req, resp, resource, params): else: raise falcon.HTTPBadRequest( title="Invalid parameter", - description='The "limit" parameter is invalid. The value must be an integer between 0 and 100.', + description='The "limit" parameter is invalid. The value must be an integer between 1 and 100.', ) else: req.context.limit = 100