style: replace case-when with hash lookup in dimension_type_to_rollup

This commit is contained in:
Shivam Mishra
2026-02-18 18:21:49 +05:30
parent 4b9b1ed7c6
commit 325afc5ab1
@@ -70,15 +70,6 @@ module V2::Reports::Concerns::RollupConditions
end
def dimension_type_to_rollup
case params[:type].to_s
when 'account'
:account
when 'agent'
:agent
when 'inbox'
:inbox
when 'team'
:team
end
{ 'account' => :account, 'agent' => :agent, 'inbox' => :inbox, 'team' => :team }[params[:type].to_s]
end
end