admin: When deleting team, also delete associations
This commit is contained in:
parent
2ca2018485
commit
02bd5f316a
3 changed files with 28 additions and 10 deletions
|
@ -96,10 +96,7 @@ func init() {
|
|||
})))
|
||||
router.DELETE("/api/teams/:tid/associations/:assoc", apiHandler(teamAssocHandler(
|
||||
func(team *fic.Team, assoc string, _ []byte) (interface{}, error) {
|
||||
if err := os.Remove(path.Join(TeamsDir, assoc)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return "null", nil
|
||||
return "null", pki.DeleteTeamAssociation(TeamsDir, assoc)
|
||||
})))
|
||||
|
||||
router.GET("/api/certs/", apiHandler(getCertificates))
|
||||
|
|
Reference in a new issue