Use pointer receiver more offen
This commit is contained in:
parent
6999b4e728
commit
c7569b5e54
59 changed files with 688 additions and 672 deletions
|
|
@ -25,11 +25,11 @@ func init() {
|
|||
}
|
||||
}))
|
||||
router.GET("/api/teams/:tid/password", apiHandler(teamHandler(
|
||||
func(team fic.Team, _ []byte) (interface{}, error) {
|
||||
func(team *fic.Team, _ []byte) (interface{}, error) {
|
||||
return team.Password, nil
|
||||
})))
|
||||
router.POST("/api/teams/:tid/password", apiHandler(teamHandler(
|
||||
func(team fic.Team, _ []byte) (interface{}, error) {
|
||||
func(team *fic.Team, _ []byte) (interface{}, error) {
|
||||
if passwd, err := fic.GeneratePassword(); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
|
|
@ -145,7 +145,7 @@ type dexConfigClient struct {
|
|||
|
||||
type dexConfig struct {
|
||||
Clients []dexConfigClient
|
||||
Teams []fic.Team
|
||||
Teams []*fic.Team
|
||||
}
|
||||
|
||||
func genDexConfig() ([]byte, error) {
|
||||
|
|
|
|||
Reference in a new issue