mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 03:10:46 -06:00
FIX: 2N+1 sql in admin /api/keys endpoint (#14679)
This commit is contained in:
parent
db53c6b248
commit
3b90d7de66
@ -5,7 +5,9 @@ class Admin::ApiController < Admin::AdminController
|
||||
# If we used "api_key", then our user provider would try to use the value for authentication
|
||||
|
||||
def index
|
||||
keys = ApiKey.where(hidden: false)
|
||||
keys = ApiKey
|
||||
.where(hidden: false)
|
||||
.includes(:user, :api_key_scopes)
|
||||
|
||||
# Put active keys first
|
||||
# Sort active keys by created_at, sort revoked keys by revoked_at
|
||||
|
Loading…
Reference in New Issue
Block a user