From c6849ee0d968132d85f95f6c4ef58db87effa611 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Wed, 15 Nov 2017 16:15:52 -0800 Subject: [PATCH] Add limit/offset to recipes/list --- src/pylorax/api/v0.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pylorax/api/v0.py b/src/pylorax/api/v0.py index 024309a1..21538bbd 100644 --- a/src/pylorax/api/v0.py +++ b/src/pylorax/api/v0.py @@ -66,7 +66,7 @@ def v0_api(api): return jsonify(error={"msg":str(e)}), 400 with api.config["GITLOCK"].lock: - recipes = map(lambda f: f[:-5], list_branch_files(api.config["GITLOCK"].repo, "master")) + recipes = take_limits(map(lambda f: f[:-5], list_branch_files(api.config["GITLOCK"].repo, "master")), offset, limit) return jsonify(recipes=recipes, limit=limit, offset=offset, total=len(recipes)) @api.route("/api/v0/recipes/info/")