feat: Team APIs (#1654)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Sojan Jose
2021-01-17 23:56:56 +05:30
committed by GitHub
parent dd90e24d02
commit a0c33254e7
29 changed files with 523 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
json.payload do
json.array! @agents do |agent|
json.partial! 'api/v1/models/user.json.jbuilder', resource: agent
json.partial! 'api/v1/models/agent.json.jbuilder', resource: agent
end
end

View File

@@ -0,0 +1 @@
json.partial! 'api/v1/models/agent.json.jbuilder', resource: @team_member

View File

@@ -0,0 +1,3 @@
json.array! @team_members do |team_member|
json.partial! 'api/v1/models/agent.json.jbuilder', resource: team_member
end

View File

@@ -0,0 +1 @@
json.partial! 'api/v1/models/team.json.jbuilder', resource: @team

View File

@@ -0,0 +1,3 @@
json.array! @teams do |team|
json.partial! 'api/v1/models/team.json.jbuilder', resource: team
end

View File

@@ -0,0 +1 @@
json.partial! 'api/v1/models/team.json.jbuilder', resource: @team

View File

@@ -0,0 +1 @@
json.partial! 'api/v1/models/team.json.jbuilder', resource: @team

View File

@@ -0,0 +1,5 @@
json.id resource.id
json.name resource.name
json.description resource.description
json.allow_auto_assign resource.allow_auto_assign
json.account_id resource.account.id