feat: hide tokens and password on contact inbox payloads (#10888)
Contact Inbox object contained unnecessary attributes which will be removed under this PR.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
json.source_id resource.source_id
|
||||
json.inbox do
|
||||
json.partial! 'api/v1/models/inbox', formats: [:json], resource: resource.inbox
|
||||
json.partial! 'api/v1/models/inbox_slim', formats: [:json], resource: resource.inbox
|
||||
end
|
||||
|
||||
7
app/views/api/v1/models/_inbox_slim.json.jbuilder
Normal file
7
app/views/api/v1/models/_inbox_slim.json.jbuilder
Normal file
@@ -0,0 +1,7 @@
|
||||
json.id resource.id
|
||||
json.avatar_url resource.try(:avatar_url)
|
||||
json.channel_id resource.channel_id
|
||||
json.name resource.name
|
||||
json.channel_type resource.channel_type
|
||||
json.provider resource.channel.try(:provider)
|
||||
json.email resource.channel.try(:email) if resource.email?
|
||||
Reference in New Issue
Block a user