Reset config test and verb change to POST (#1986)

This commit is contained in:
adfost
2022-05-11 22:31:40 -07:00
committed by GitHub
parent 117da114dc
commit 38c74bdfa7
6 changed files with 68 additions and 8 deletions

View File

@@ -2587,7 +2587,7 @@ func init() {
}
},
"/configs/{name}/reset": {
"get": {
"post": {
"tags": [
"Configuration"
],
@@ -9535,7 +9535,7 @@ func init() {
}
},
"/configs/{name}/reset": {
"get": {
"post": {
"tags": [
"Configuration"
],

View File

@@ -48,7 +48,7 @@ func NewResetConfig(ctx *middleware.Context, handler ResetConfigHandler) *ResetC
return &ResetConfig{Context: ctx, Handler: handler}
}
/* ResetConfig swagger:route GET /configs/{name}/reset Configuration resetConfig
/* ResetConfig swagger:route POST /configs/{name}/reset Configuration resetConfig
Configuration reset

View File

@@ -1692,10 +1692,10 @@ func (o *ConsoleAPI) initHandlerCache() {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/user"] = user.NewRemoveUser(o.context, o.UserRemoveUserHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/configs/{name}/reset"] = configuration.NewResetConfig(o.context, o.ConfigurationResetConfigHandler)
o.handlers["POST"]["/configs/{name}/reset"] = configuration.NewResetConfig(o.context, o.ConfigurationResetConfigHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}