Skip to content

Commit

Permalink
fix admin's all users view
Browse files Browse the repository at this point in the history
  • Loading branch information
tuz666 committed Dec 17, 2024
1 parent 28c53bb commit eef55be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion arcsi/api/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def make_user(self, data, **kwargs):
@roles_required("admin")
def list_users():
users = User.query.all()
return many_user_details_schema.dumps(users)
return many_user_details_schema.dump(users)


@arcsi.route("/user/<int:id>", methods=["GET"])
Expand Down
2 changes: 1 addition & 1 deletion arcsi/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ <h1>
<div class="has-submenu admin-menu" title="ADMIN INTERFACE">
<i class="fas fa-users-cog"></i>
<div class="hidden-sub">
<a href="{{ url_for('router.list_users') }}">All users</a>
<a href="{{ url_for('router.view_list_users') }}">All users</a>
</div>
</div>
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions arcsi/view/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

@router.route("/user/all")
@roles_required('admin')
def list_users():
users = list_users().json()
def view_list_users():
users = list_users()
return render_template("user/list.html", users=users)


Expand Down

0 comments on commit eef55be

Please sign in to comment.