initial permissions endpoint implementation
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-11 11:34:43 +11:00
parent b77e47ba7e
commit eb5707a376
6 changed files with 203 additions and 9 deletions

View File

@@ -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