admin: unify API to revoke certificates

This commit is contained in:
nemunaire 2017-04-05 01:54:03 +02:00
parent 5a6b27ff18
commit 2e8d28542e

View File

@ -19,11 +19,12 @@ func init() {
func(_ httprouter.Params, _ []byte) (interface{}, error) { return fic.GenerateCRL() })) func(_ httprouter.Params, _ []byte) (interface{}, error) { return fic.GenerateCRL() }))
router.HEAD("/api/teams/:tid/certificate.p12", apiHandler(teamHandler(GetTeamCertificate)))
router.GET("/api/teams/:tid/certificate.p12", apiHandler(teamHandler(GetTeamCertificate))) router.GET("/api/teams/:tid/certificate.p12", apiHandler(teamHandler(GetTeamCertificate)))
router.DELETE("/api/teams/:tid/certificate.p12", apiHandler(teamHandler(
func(team fic.Team, _ []byte) (interface{}, error) { return team.RevokeCert() })))
router.GET("/api/teams/:tid/certificate/generate", apiHandler(teamHandler( router.GET("/api/teams/:tid/certificate/generate", apiHandler(teamHandler(
func(team fic.Team, _ []byte) (interface{}, error) { return team.GenerateCert() }))) func(team fic.Team, _ []byte) (interface{}, error) { return team.GenerateCert() })))
router.GET("/api/teams/:tid/certificate/revoke", apiHandler(teamHandler(
func(team fic.Team, _ []byte) (interface{}, error) { return team.RevokeCert() })))
} }