FIX: Move title and name out of BasicUserSerializer.
This commit is contained in:
parent
9f3eaf4c95
commit
bea0856f1c
|
@ -1,5 +1,5 @@
|
|||
class BasicUserSerializer < ApplicationSerializer
|
||||
attributes :id, :username, :avatar_template, :title, :name
|
||||
attributes :id, :username, :avatar_template
|
||||
|
||||
def include_name?
|
||||
SiteSetting.enable_names?
|
||||
|
|
|
@ -6,7 +6,7 @@ class GroupPostSerializer < ApplicationSerializer
|
|||
:url,
|
||||
:category
|
||||
|
||||
has_one :user, serializer: BasicUserSerializer, embed: :object
|
||||
has_one :user, serializer: GroupPostUserSerializer, embed: :object
|
||||
has_one :topic, serializer: BasicTopicSerializer, embed: :object
|
||||
|
||||
def title
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
class GroupPostUserSerializer < BasicUserSerializer
|
||||
attributes :title, :name
|
||||
end
|
Loading…
Reference in New Issue