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

@@ -41,19 +41,25 @@ class V2::ReportBuilder
user
when :label
label
when :team
team
end
end
def inbox
@inbox ||= account.inboxes.where(id: params[:id]).first
@inbox ||= account.inboxes.find(params[:id])
end
def user
@user ||= account.users.where(id: params[:id]).first
@user ||= account.users.find(params[:id])
end
def label
@label ||= account.labels.where(id: params[:id]).first
@label ||= account.labels.find(params[:id])
end
def team
@team ||= account.teams.find(params[:id])
end
def conversations_count