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

@ -83,7 +83,8 @@ class UserSerializer < BasicUserSerializer
:second_factor_remaining_backup_codes,
:associated_accounts,
:profile_background_upload_url,
:card_background_upload_url
:card_background_upload_url,
:featured_topic
has_one :invited_by, embed: :object, serializer: BasicUserSerializer
has_many :groups, embed: :object, serializer: BasicGroupSerializer
@ -484,4 +485,7 @@ class UserSerializer < BasicUserSerializer
object.card_background_upload&.url
end
def featured_topic
object.user_profile.featured_topic
end
end