FEATURE: Featured topic for user profile & card (#8461)

This commit is contained in:
Mark VanLandingham
2019-12-09 11:15:47 -08:00
committed by GitHub
parent b5236591e9
commit 14cb386f1e
34 changed files with 418 additions and 95 deletions

View File

@ -45,7 +45,8 @@ class CurrentUserSerializer < BasicUserSerializer
:second_factor_enabled,
:ignored_users,
:title_count_mode,
:timezone
:timezone,
:featured_topic
def groups
object.visible_groups.pluck(:id, :name).map { |id, name| { id: id, name: name.downcase } }
@ -217,4 +218,8 @@ class CurrentUserSerializer < BasicUserSerializer
def second_factor_enabled
object.totp_enabled? || object.security_keys_enabled?
end
def featured_topic
object.user_profile.featured_topic
end
end