2020-01-26 13:08:47 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module API
|
|
|
|
module Entities
|
|
|
|
class UserSafe < Grape::Entity
|
2021-12-06 22:12:22 -05:00
|
|
|
expose :id, :username
|
|
|
|
expose :name do |user|
|
2022-03-08 16:20:24 -05:00
|
|
|
user.redacted_name(options[:current_user])
|
2021-12-06 22:12:22 -05:00
|
|
|
end
|
2020-01-26 13:08:47 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|