1
0
forked from ScoDoc/ScoDoc

Modif route API /user/<int:uid>/edit. Fix #472

This commit is contained in:
Emmanuel Viennet 2022-08-13 23:28:20 +02:00
parent 9940e6f01d
commit e899cd0d16
2 changed files with 3 additions and 3 deletions

View File

@ -124,8 +124,8 @@ def user_create():
return jsonify(user.to_dict()) return jsonify(user.to_dict())
@bp.route("/user/edit/<int:uid>", methods=["POST"]) @bp.route("/user/<int:uid>/edit", methods=["POST"])
@api_web_bp.route("/user/edit/<int:uid>", methods=["POST"]) @api_web_bp.route("/user/<int:uid>/edit", methods=["POST"])
@login_required @login_required
@scodoc @scodoc
@permission_required(Permission.ScoUsersAdmin) @permission_required(Permission.ScoUsersAdmin)

View File

@ -94,7 +94,7 @@ def test_edit_users(api_admin_headers):
def test_roles(api_admin_headers): def test_roles(api_admin_headers):
""" """
Routes: /user/create Routes: /user/create
/user/edit/<int:uid> /user/<int:uid>/edit
""" """
admin_h = api_admin_headers admin_h = api_admin_headers
user = POST_JSON( user = POST_JSON(