Chore: Fix N+1 queries in dashboard side (#1254)
* Chore: Fix N+1 queries in dashboard side Fixed a couple of N+1 queries fired on the dashboard side of the app to improve performance.
This commit is contained in:
@@ -63,6 +63,6 @@ class Api::V1::Accounts::ContactsController < Api::V1::Accounts::BaseController
|
||||
end
|
||||
|
||||
def fetch_contact
|
||||
@contact = Current.account.contacts.find(params[:id])
|
||||
@contact = Current.account.contacts.includes(contact_inboxes: [:inbox]).find(params[:id])
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user