discourse/app/serializers/basic_api_key_serializer.rb
Régis Hanol 7dcd707c59 PERF: introduce a basic api key serializer
For better performances when listing all the API keys.

Loading all the "api key scopes" is slow and not required when showing the list of all the api keys.
2024-04-24 19:16:10 +02:00

8 lines
242 B
Ruby

# frozen_string_literal: true
class BasicApiKeySerializer < ApplicationSerializer
attributes :id, :truncated_key, :description, :created_at, :last_used_at, :revoked_at
has_one :user, serializer: BasicUserSerializer, embed: :objects
end