Skip to content

Commit

Permalink
feat: use short_summary for downloading reports [CW-2962] (#8733)
Browse files Browse the repository at this point in the history
  • Loading branch information
scmmishra committed Jan 18, 2024
1 parent 1f4d860 commit 4bf23ad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions app/builders/v2/report_builder.rb
Expand Up @@ -46,6 +46,14 @@ def summary
}
end

def short_summary
{
conversations_count: conversations.count,
avg_first_response_time: avg_first_response_time_summary,
avg_resolution_time: avg_resolution_time_summary
}
end

def conversation_metrics
if params[:type].equal?(:account)
live_conversations
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/api/v2/accounts/reports_helper.rb
Expand Up @@ -37,7 +37,7 @@ def generate_report(report_params)
business_hours: ActiveModel::Type::Boolean.new.cast(params[:business_hours])
}
)
).summary
).short_summary
end

private
Expand Down

0 comments on commit 4bf23ad

Please sign in to comment.