Skip to content

Return array of JSON dicts for get_users #514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/server/api/user_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,14 +432,9 @@ def user_get_list():
)
result = connection.execute(s)

user_list = ""
query_result_json = [dict(row) for row in result]

for row in result:
user_list += str(row.values()) + ","

ul = str(row.keys()) + "," + user_list

return jsonify(ul), 200
return jsonify(query_result_json), 200

@user_api.route("/api/admin/user/get_info/<string:username>", methods=["GET"])
@jwt_ops.admin_required
Expand Down