Skip to content

Commit

Permalink
Test adding Option method
Browse files Browse the repository at this point in the history
Signed-off-by: Maia Iyer <[email protected]>
  • Loading branch information
maia-iyer committed Sep 11, 2024
1 parent 7a393f6 commit de09e6f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/agent/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -970,8 +970,8 @@ func (s *Server) GetRouter() http.Handler {
apiRtr.HandleFunc("/api/tornjak/clusters/delete", s.clusterDelete)

// Spire APIs with versioning
apiRtr.HandleFunc("/api/v1/spire/serverinfo", s.debugServer).Methods("GET")
apiRtr.HandleFunc("/api/v1/spire/healthcheck", s.healthcheck).Methods("GET")
apiRtr.HandleFunc("/api/v1/spire/serverinfo", s.debugServer).Methods(http.MethodGet, http.MethodOptions)
apiRtr.HandleFunc("/api/v1/spire/healthcheck", s.healthcheck).Methods(http.MethodGet, http.MethodOptions)
apiRtr.HandleFunc("/api/v1/spire/agents", s.agentList).Methods("GET")
apiRtr.HandleFunc("/api/v1/spire/agents/ban", s.agentBan).Methods("POST")
apiRtr.HandleFunc("/api/v1/spire/agents", s.agentDelete).Methods("DELETE")
Expand All @@ -996,7 +996,7 @@ func (s *Server) GetRouter() http.Handler {
apiRtr.HandleFunc("/api/v1/tornjak/selectors", s.tornjakSelectorsList).Methods("GET")
apiRtr.HandleFunc("/api/v1/tornjak/agents", s.tornjakAgentsList).Methods("GET")
// Clusters
apiRtr.HandleFunc("/api/v1/tornjak/clusters", s.clusterList).Methods("GET")
apiRtr.HandleFunc("/api/v1/tornjak/clusters", s.clusterList).Methods(http.MethodGet, http.MethodOptions)
apiRtr.HandleFunc("/api/v1/tornjak/clusters", s.clusterCreate).Methods("POST")
apiRtr.HandleFunc("/api/v1/tornjak/clusters", s.clusterEdit).Methods("PATCH")
apiRtr.HandleFunc("/api/v1/tornjak/clusters", s.clusterDelete).Methods("DELETE")
Expand Down

0 comments on commit de09e6f

Please sign in to comment.