fix: return "message" instead of "error" so it is handled better at the client.
This commit is contained in:
@@ -69,7 +69,7 @@ async def api_usermanager_users_delete(user_id):
|
||||
async def api_usermanager_activate_extension():
|
||||
user = get_user(g.data["userid"])
|
||||
if not user:
|
||||
return jsonify({"error": "no such user"}), HTTPStatus.NO_CONTENT
|
||||
return jsonify({"message": "no such user"}), HTTPStatus.NOT_FOUND
|
||||
update_user_extension(user_id=g.data["userid"], extension=g.data["extension"], active=g.data["active"])
|
||||
return jsonify({"extension": "updated"}), HTTPStatus.CREATED
|
||||
|
||||
|
||||
Reference in New Issue
Block a user