Add limit/offset to recipes/list

This commit is contained in:
Brian C. Lane 2017-11-15 16:15:52 -08:00
parent 2cd4fcfd88
commit 1d53d00532
1 changed files with 1 additions and 1 deletions

View File

@ -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/<recipe_names>")