Update records

This commit is contained in:
Pranav
2024-05-15 20:41:44 -07:00
parent 072c607062
commit ac71dacc61
9 changed files with 96 additions and 57 deletions
+11 -12
View File
@@ -66,18 +66,17 @@ module Api::V2::Accounts::HeatmapHelper
end
def generate_heatmap_data(date, offset)
report_params = {
type: :account,
group_by: 'hour',
metric: 'conversations_count',
business_hours: false
}
V2::ReportBuilder.new(Current.account, report_params.merge({
since: since_timestamp(date),
until: until_timestamp(date),
timezone_offset: offset
})).build
V2::NewReportBuilder.new(
Current.account, {
type: :account,
group_by: 'hour',
metric: 'conversations_count',
business_hours: false,
since: since_timestamp(date),
until: until_timestamp(date),
timezone_offset: offset
}
).timeseries
end
def transform_data(data, zone_transform)