mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 06:03:38 +08:00
FIX: Use scope name when serializing UserApiKeys (#10871)
This issue was introduced in 1ba9b34b03
, when the scopes were changed from an array of strings to a dedicated table
This commit is contained in:
parent
68524f72aa
commit
e47b847ac2
|
@ -131,7 +131,7 @@ class UserSerializer < UserCardSerializer
|
|||
{
|
||||
id: k.id,
|
||||
application_name: k.application_name,
|
||||
scopes: k.scopes.map { |s| I18n.t("user_api_key.scopes.#{s}") },
|
||||
scopes: k.scopes.map { |s| I18n.t("user_api_key.scopes.#{s.name}") },
|
||||
created_at: k.created_at,
|
||||
last_used_at: k.last_used_at,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user