mirror of
https://github.com/discourse/discourse.git
synced 2025-04-30 10:54:30 +08:00

**Note:** Do not merge before the backfill (#31606) is merged. ### What is this change? We're now storing the selected API key scope mode in the back-end, and can display it in the API key list. **Screenshot:** <img width="551" alt="Screenshot 2025-03-04 at 7 27 42 PM" src="https://github.com/user-attachments/assets/9f234242-cfaa-4a2c-93e9-740770bd9944" />
9 lines
327 B
Ruby
9 lines
327 B
Ruby
# frozen_string_literal: true
|
|
|
|
class BasicApiKeySerializer < ApplicationSerializer
|
|
attributes :id, :truncated_key, :scope_mode, :description, :created_at, :last_used_at, :revoked_at
|
|
|
|
has_one :user, serializer: BasicUserSerializer, embed: :objects
|
|
has_one :created_by, serializer: BasicUserSerializer, embed: :objects
|
|
end
|