fix: naming change for parameter
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Daniel Herrmann 2024-03-05 15:00:01 +01:00
parent 4f36184c98
commit 6781e5e6cd
1 changed files with 2 additions and 2 deletions

View File

@ -216,7 +216,7 @@ func addMoreInfoToTeams(s *xorm.Session, teams []*Team) (err error) {
// If def_adm is true, the user will be an admin of the team
// Note: this function has been extracted from the Create method to allow
// an additional parameter to control whether the user should become admin of the team
func (t *Team) CreateNewTeam(s *xorm.Session, a web.Auth, adm bool) (err error) {
func (t *Team) CreateNewTeam(s *xorm.Session, a web.Auth, firstUserShouldBeAdmin bool) (err error) {
doer, err := user.GetFromAuth(a)
if err != nil {
@ -236,7 +236,7 @@ func (t *Team) CreateNewTeam(s *xorm.Session, a web.Auth, adm bool) (err error)
return
}
tm := TeamMember{TeamID: t.ID, Username: doer.Username, Admin: adm}
tm := TeamMember{TeamID: t.ID, Username: doer.Username, Admin: firstUserShouldBeAdmin}
if err = tm.Create(s, doer); err != nil {
return err
}