feat: Team APIs (#1654)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
json.partial! 'api/v1/models/agent.json.jbuilder', resource: @team_member
|
||||
@@ -0,0 +1,3 @@
|
||||
json.array! @team_members do |team_member|
|
||||
json.partial! 'api/v1/models/agent.json.jbuilder', resource: team_member
|
||||
end
|
||||
1
app/views/api/v1/accounts/teams/create.json.jbuilder
Normal file
1
app/views/api/v1/accounts/teams/create.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.partial! 'api/v1/models/team.json.jbuilder', resource: @team
|
||||
3
app/views/api/v1/accounts/teams/index.json.jbuilder
Normal file
3
app/views/api/v1/accounts/teams/index.json.jbuilder
Normal file
@@ -0,0 +1,3 @@
|
||||
json.array! @teams do |team|
|
||||
json.partial! 'api/v1/models/team.json.jbuilder', resource: team
|
||||
end
|
||||
1
app/views/api/v1/accounts/teams/show.json.jbuilder
Normal file
1
app/views/api/v1/accounts/teams/show.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.partial! 'api/v1/models/team.json.jbuilder', resource: @team
|
||||
1
app/views/api/v1/accounts/teams/update.json.jbuilder
Normal file
1
app/views/api/v1/accounts/teams/update.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.partial! 'api/v1/models/team.json.jbuilder', resource: @team
|
||||
5
app/views/api/v1/models/_team.json.jbuilder
Normal file
5
app/views/api/v1/models/_team.json.jbuilder
Normal 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
|
||||
Reference in New Issue
Block a user