mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 17:53:40 +08:00
23 lines
282 B
Ruby
23 lines
282 B
Ruby
class TopicPostCountSerializer < BasicUserSerializer
|
|
|
|
attributes :post_count
|
|
|
|
def id
|
|
object[:user].id
|
|
end
|
|
|
|
def username
|
|
object[:user].username
|
|
end
|
|
|
|
def avatar_template
|
|
object[:user].avatar_template
|
|
end
|
|
|
|
def post_count
|
|
object[:post_count]
|
|
end
|
|
|
|
|
|
end
|