Skip to content

Commit

Permalink
change redact routes to be under api/v1/troubleshoot
Browse files Browse the repository at this point in the history
  • Loading branch information
laverya committed May 22, 2020
1 parent 08af432 commit 1ceb9aa
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions kotsadm/pkg/apiserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ func Start() {
r.Path("/api/v1/troubleshoot/supportbundle/{bundleId}/download").Methods("OPTIONS", "GET").HandlerFunc(handlers.DownloadSupportBundle)
r.Path("/api/v1/troubleshoot/analyzebundle/{bundleId}").Methods("POST").HandlerFunc(handlers.NodeProxy(upstream))

// redactor routes
r.Path("/api/v1/redact/set").Methods("OPTIONS", "PUT").HandlerFunc(handlers.UpdateRedact)
r.Path("/api/v1/redact/get").Methods("OPTIONS", "GET").HandlerFunc(handlers.GetRedact)
r.Path("/api/v1/troubleshoot/redacts").Methods("OPTIONS", "GET").HandlerFunc(handlers.ListRedactors)
r.Path("/api/v1/troubleshoot/redact/metadata/{slug}").Methods("OPTIONS", "GET").HandlerFunc(handlers.GetRedactMetadata)
r.Path("/api/v1/troubleshoot/redact/metadata/{slug}").Methods("POST").HandlerFunc(handlers.SetRedactMetadata)
r.Path("/api/v1/troubleshoot/redact/individual/{slug}").Methods("OPTIONS", "GET").HandlerFunc(handlers.GetRedactYaml)
r.Path("/api/v1/troubleshoot/redact/individual/{slug}").Methods("POST").HandlerFunc(handlers.SetRedactYaml)
r.Path("/api/v1/troubleshoot/redact/individual/{slug}").Methods("DELETE").HandlerFunc(handlers.DeleteRedact)

r.PathPrefix("/api/v1/kots/").Methods("OPTIONS").HandlerFunc(handlers.CORS)
r.PathPrefix("/api/v1/kots/").Methods("HEAD", "GET", "POST", "PUT", "DELETE").HandlerFunc(handlers.NodeProxy(upstream))

Expand Down Expand Up @@ -116,16 +126,6 @@ func Start() {
// Find a home snapshot routes
r.Path("/api/v1/snapshot/{backup}/logs").Methods("OPTIONS", "GET").HandlerFunc(handlers.DownloadSnapshotLogs)

// redactor routes
r.Path("/api/v1/redact/set").Methods("OPTIONS", "PUT").HandlerFunc(handlers.UpdateRedact)
r.Path("/api/v1/redact/get").Methods("OPTIONS", "GET").HandlerFunc(handlers.GetRedact)
r.Path("/api/v1/redact/list").Methods("OPTIONS", "GET").HandlerFunc(handlers.ListRedactors)
r.Path("/api/v1/redact/metadata/{slug}").Methods("OPTIONS", "GET").HandlerFunc(handlers.GetRedactMetadata)
r.Path("/api/v1/redact/metadata/{slug}").Methods("POST").HandlerFunc(handlers.SetRedactMetadata)
r.Path("/api/v1/redact/individual/{slug}").Methods("OPTIONS", "GET").HandlerFunc(handlers.GetRedactYaml)
r.Path("/api/v1/redact/individual/{slug}").Methods("POST").HandlerFunc(handlers.SetRedactYaml)
r.Path("/api/v1/redact/individual/{slug}").Methods("DELETE").HandlerFunc(handlers.DeleteRedact)

// TODO

// KURL
Expand Down

0 comments on commit 1ceb9aa

Please sign in to comment.