chore: Add Additional Contact APIs (#1130)
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
json.partial! 'api/v1/models/contact_inbox.json.jbuilder', resource: @contact_inbox
|
||||
5
app/views/api/v1/accounts/contacts/search.json.jbuilder
Normal file
5
app/views/api/v1/accounts/contacts/search.json.jbuilder
Normal file
@@ -0,0 +1,5 @@
|
||||
json.payload do
|
||||
json.array! @contacts do |contact|
|
||||
json.partial! 'api/v1/models/contact.json.jbuilder', resource: contact
|
||||
end
|
||||
end
|
||||
@@ -5,3 +5,8 @@ json.id resource.id
|
||||
json.name resource.name
|
||||
json.phone_number resource.phone_number
|
||||
json.thumbnail resource.avatar_url
|
||||
json.contact_inboxes do
|
||||
json.array! resource.contact_inboxes do |contact_inbox|
|
||||
json.partial! 'api/v1/models/contact_inbox.json.jbuilder', resource: contact_inbox
|
||||
end
|
||||
end
|
||||
|
||||
2
app/views/api/v1/models/_contact_inbox.json.jbuilder
Normal file
2
app/views/api/v1/models/_contact_inbox.json.jbuilder
Normal file
@@ -0,0 +1,2 @@
|
||||
json.source_id resource.source_id
|
||||
json.inbox resource.inbox
|
||||
Reference in New Issue
Block a user