Skip to content

Commit

Permalink
cert delete
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmanning committed Oct 12, 2015
1 parent a1cba63 commit 89c5138
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions api/controllers/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func NewRouter() (router *mux.Router) {
router.HandleFunc("/apps/{app}/releases/{release}/promote", api("release.promote", ReleasePromote)).Methods("POST")
router.HandleFunc("/apps/{app}/ssl", api("ssl.list", SSLList)).Methods("GET")
router.HandleFunc("/apps/{app}/ssl", api("ssl.create", SSLCreate)).Methods("POST")
router.HandleFunc("/apps/{app}/ssl/{port}", api("ssl.delete", SSLDelete)).Methods("DELETE")
router.HandleFunc("/services", api("service.list", ServiceList)).Methods("GET")
router.HandleFunc("/services", api("service.create", ServiceCreate)).Methods("POST")
router.HandleFunc("/services/{service}", api("service.show", ServiceShow)).Methods("GET")
Expand Down
2 changes: 1 addition & 1 deletion api/controllers/ssl.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func SSLCreate(rw http.ResponseWriter, r *http.Request) *httperr.Error {
ssl, err := models.CreateSSL(a, port, body, key)

if awsError(err) == "ValidationError" {
return httperr.Errorf(404, "no such app: %s", a)
return httperr.Errorf(404, "%s", err)
}

if err != nil {
Expand Down
5 changes: 3 additions & 2 deletions api/models/ssl.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ func CreateSSL(a, port, body, key string) (*SSL, error) {
Arn: *arn,
}

fmt.Println("%+v\n", app)
stack_params := map[string]string{}
stack_params["SSLArn"] = ssl.Arn
stack_params["SSLPort"] = ssl.Port
stack_params[fmt.Sprintf("SSL%sArn", port)] = ssl.Arn
stack_params[fmt.Sprintf("SSL%sPort", port)] = ssl.Port

err = app.UpdateParams(stack_params)

Expand Down

0 comments on commit 89c5138

Please sign in to comment.