feat: API to Filter reports by teams (#3066)

Add API to Filter reports by teams

Fixes: #2916
This commit is contained in:
Aswin Dev P.S
2021-09-27 21:12:08 +05:30
committed by GitHub
parent 8b7f6c691a
commit 15aaa8883c
10 changed files with 88 additions and 9 deletions

View File

@@ -29,6 +29,12 @@ class Api::V2::Accounts::ReportsController < Api::V1::Accounts::BaseController
render layout: false, template: 'api/v2/accounts/reports/labels.csv.erb', format: 'csv'
end
def teams
response.headers['Content-Type'] = 'text/csv'
response.headers['Content-Disposition'] = 'attachment; filename=teams_report.csv'
render layout: false, template: 'api/v2/accounts/reports/teams.csv.erb', format: 'csv'
end
private
def check_authorization