This commit is contained in:
kolaente 2018-07-26 10:08:01 +02:00
parent fba505130d
commit 7b07137b67
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
2 changed files with 7 additions and 7 deletions

View file

@ -454,7 +454,7 @@ func (err ErrTeamAlreadyHasAccess) Error() string {
// ErrUserIsMemberOfTeam represents an error where a user is already member of a team. // ErrUserIsMemberOfTeam represents an error where a user is already member of a team.
type ErrUserIsMemberOfTeam struct { type ErrUserIsMemberOfTeam struct {
TeamID int64 TeamID int64
UserID int64 UserID int64
} }
// IsErrUserIsMemberOfTeam checks if an error is ErrUserIsMemberOfTeam. // IsErrUserIsMemberOfTeam checks if an error is ErrUserIsMemberOfTeam.

View file

@ -37,10 +37,10 @@ func (t *Team) AfterLoad() {
// TeamMember defines the relationship between a user and a team // TeamMember defines the relationship between a user and a team
type TeamMember struct { type TeamMember struct {
ID int64 `xorm:"int(11) autoincr not null unique pk" json:"id"` ID int64 `xorm:"int(11) autoincr not null unique pk" json:"id"`
TeamID int64 `xorm:"int(11) not null" json:"team_id" param:"team"` TeamID int64 `xorm:"int(11) not null" json:"team_id" param:"team"`
UserID int64 `xorm:"int(11) not null" json:"user_id" param:"user"` UserID int64 `xorm:"int(11) not null" json:"user_id" param:"user"`
Admin bool `xorm:"tinyint(1)" json:"admin"` Admin bool `xorm:"tinyint(1)" json:"admin"`
Created int64 `xorm:"created" json:"created"` Created int64 `xorm:"created" json:"created"`
Updated int64 `xorm:"updated" json:"updated"` Updated int64 `xorm:"updated" json:"updated"`
@ -56,7 +56,7 @@ func (TeamMember) TableName() string {
// TeamUser is the team member type // TeamUser is the team member type
type TeamUser struct { type TeamUser struct {
User `xorm:"extends"` User `xorm:"extends"`
Admin bool `json:"admin"` Admin bool `json:"admin"`
} }