Merge pull request #4952 from muffinmad/patch-1
Fix function argument name
This commit is contained in:
commit
3502cc951b
1 changed files with 1 additions and 1 deletions
|
|
@ -297,7 +297,7 @@ provide get (list) and post (create) methods.
|
|||
db.session.commit()
|
||||
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)
|
||||
group = GroupAPI.as_view(f"{name}-group", model)
|
||||
app.add_url_rule(f"/{name}/<int:id>", view_func=item)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue