2020-03-13 15:44:24 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module API
|
|
|
|
module Entities
|
|
|
|
class UserSafe < Grape::Entity
|
2021-12-07 22:27:20 +05:30
|
|
|
expose :id, :username
|
|
|
|
expose :name do |user|
|
2022-05-07 20:08:51 +05:30
|
|
|
user.redacted_name(options[:current_user])
|
2021-12-07 22:27:20 +05:30
|
|
|
end
|
2020-03-13 15:44:24 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|