Fix function argument name

This commit is contained in:
Andrii Kolomoiets 2023-01-23 17:01:49 +02:00 committed by GitHub
parent 39fc0c6bad
commit d93760d8bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -297,7 +297,7 @@ provide get (list) and post (create) methods.
db.session.commit() db.session.commit()
return jsonify(item.to_json()) return jsonify(item.to_json())
def register_api(app, model, url): def register_api(app, model, name):
item = ItemAPI.as_view(f"{name}-item", model) item = ItemAPI.as_view(f"{name}-item", model)
group = GroupAPI.as_view(f"{name}-group", model) group = GroupAPI.as_view(f"{name}-group", model)
app.add_url_rule(f"/{name}/<int:id>", view_func=item) app.add_url_rule(f"/{name}/<int:id>", view_func=item)