Class: Api::V1::UsersController
- Inherits:
-
KebabRemoteApi::ApplicationController
- Object
- KebabRemoteApi::ApplicationController
- Api::V1::UsersController
- Defined in:
- app/controllers/kebab_remote_api/api/v1/users_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'app/controllers/kebab_remote_api/api/v1/users_controller.rb', line 5 def index render status: 200, json: { 'active_user' => User.with_block_status(:active).count, 'total_user' => User.all.count, 'total_user_by_role' => User.role.values.map { |role| { "role_name" => role.to_s, "count" => User.with_role(role).count } } }.to_json end |