teams: use orgId in all team and team member operations (#10862)

Also fixes issue in org users tests for postgres
This commit is contained in:
Marcus Efraimsson
2018-02-09 17:26:15 +01:00
committed by Torkel Ödegaard
parent 111b32290a
commit e1e0b5f951
9 changed files with 58 additions and 47 deletions
+5 -1
View File
@@ -37,18 +37,22 @@ type UpdateTeamCommand struct {
Id int64
Name string
Email string
OrgId int64 `json:"-"`
}
type DeleteTeamCommand struct {
Id int64
OrgId int64
Id int64
}
type GetTeamByIdQuery struct {
OrgId int64
Id int64
Result *Team
}
type GetTeamsByUserQuery struct {
OrgId int64
UserId int64 `json:"userId"`
Result []*Team `json:"teams"`
}
+2
View File
@@ -31,6 +31,7 @@ type AddTeamMemberCommand struct {
}
type RemoveTeamMemberCommand struct {
OrgId int64 `json:"-"`
UserId int64
TeamId int64
}
@@ -39,6 +40,7 @@ type RemoveTeamMemberCommand struct {
// QUERIES
type GetTeamMembersQuery struct {
OrgId int64
TeamId int64
Result []*TeamMemberDTO
}