docbrown/app/serializers/webhook/user_serializer.rb
Jan Klimo a6ea2c9618
Migrate serialization to jsonapi-serializer (#9682)
This replaces the abandoned fast_jsonapi.
2020-08-08 15:41:44 +02:00

12 lines
379 B
Ruby

module Webhook
class UserSerializer < ApplicationSerializer
attributes :name, :username, :twitter_username, :github_username
attribute :website_url, &:processed_website_url
attribute :profile_image do |user|
ProfileImage.new(user).get(width: 640)
end
attribute :profile_image_90 do |user|
ProfileImage.new(user).get(width: 90)
end
end
end