Files
leadchat/app/views/api/v1/accounts/contacts/active.json.jbuilder
Tanmay Deep Sharma 59f7c8aa55 perf: Contact optimisation fixes (#12016)
- Avoids the duplicate count queries for contact end point

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-09-25 18:59:55 +05:30

11 lines
271 B
Ruby

json.meta do
json.count @contacts_count
json.current_page @current_page
end
json.payload do
json.array! @contacts do |contact|
json.partial! 'api/v1/models/contact', formats: [:json], resource: contact, with_contact_inboxes: @include_contact_inboxes
end
end