mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
PERF: Use a separate route for user cards, and split user serializer (#8789)
Adds a new route `/u/{username}/card.json`, which has a reduced number of fields. This change is behind a hidden site setting, so we can test compatibility before rolling out.
This commit is contained in:
@@ -478,6 +478,7 @@ Discourse::Application.routes.draw do
|
||||
get "#{root_path}/:username/profile-hidden" => "users#profile_hidden"
|
||||
put "#{root_path}/:username/feature-topic" => "users#feature_topic", constraints: { username: RouteFormat.username }
|
||||
put "#{root_path}/:username/clear-featured-topic" => "users#clear_featured_topic", constraints: { username: RouteFormat.username }
|
||||
get "#{root_path}/:username/card.json" => "users#show_card", format: :json, constraints: { username: RouteFormat.username }
|
||||
end
|
||||
|
||||
get "user-badges/:username.json" => "user_badges#username", constraints: { username: RouteFormat.username }, defaults: { format: :json }
|
||||
|
||||
@@ -1976,6 +1976,11 @@ uncategorized:
|
||||
default: ""
|
||||
hidden: true
|
||||
|
||||
enable_new_user_card_route:
|
||||
default: false
|
||||
client: true
|
||||
hidden: true
|
||||
|
||||
user_preferences:
|
||||
default_email_digest_frequency:
|
||||
enum: "DigestEmailSiteSetting"
|
||||
|
||||
Reference in New Issue
Block a user