Fix API perms request returning stack

This commit is contained in:
amcmanu3 2024-04-06 15:05:26 -04:00
parent f3ca5b9ca7
commit afb7575398

View File

@ -52,6 +52,8 @@ class ApiUsersUserPermissionsHandler(BaseApiHandler):
},
)
counter_data = PermissionsCrafty.get_created_quantity_list(user_id)
self.finish_json(
200,
{
@ -59,9 +61,9 @@ class ApiUsersUserPermissionsHandler(BaseApiHandler):
"data": {
"permissions": res_data.permissions,
"counters": {
SERVER_CREATION: res_data.created_server,
USER_CONFIG: res_data.created_user,
ROLES_CONFIG: res_data.created_role,
SERVER_CREATION: counter_data["SERVER_CREATION"],
USER_CONFIG: counter_data["USER_CONFIG"],
ROLES_CONFIG: counter_data["ROLES_CONFIG"],
},
"limits": {
SERVER_CREATION: res_data.limit_server_creation,