Fix function argument name
This commit is contained in:
parent
39fc0c6bad
commit
d93760d8bd
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue