initial permissions endpoint implementation
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -72,10 +72,13 @@ func (g *Group) GroupAdd() (*Group, error) {
|
||||
} else {
|
||||
affected, _ := result.RowsAffected()
|
||||
id, _ := result.LastInsertId()
|
||||
g.GroupId = int(id)
|
||||
log.Printf("GroupAdd insert returned result id '%d' affecting %d row(s).\n", id, affected)
|
||||
}
|
||||
} else {
|
||||
log.Printf("GroupAdd group name already exists : '%v'\n", err)
|
||||
errString := "group with name already exists"
|
||||
log.Printf("GroupAdd %s\n", errString)
|
||||
return &Group{}, errors.New(errString)
|
||||
}
|
||||
|
||||
return g, nil
|
||||
|
Reference in New Issue
Block a user