upgrade swagger version to v0.27.0 (#798)
This commit is contained in:
@@ -48,7 +48,7 @@ func NewUpdateUserInfo(ctx *middleware.Context, handler UpdateUserInfoHandler) *
|
||||
return &UpdateUserInfo{Context: ctx, Handler: handler}
|
||||
}
|
||||
|
||||
/*UpdateUserInfo swagger:route PUT /users/{name} AdminAPI updateUserInfo
|
||||
/* UpdateUserInfo swagger:route PUT /users/{name} AdminAPI updateUserInfo
|
||||
|
||||
Update User Info
|
||||
|
||||
@@ -61,17 +61,16 @@ type UpdateUserInfo struct {
|
||||
func (o *UpdateUserInfo) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
||||
route, rCtx, _ := o.Context.RouteInfo(r)
|
||||
if rCtx != nil {
|
||||
r = rCtx
|
||||
*r = *rCtx
|
||||
}
|
||||
var Params = NewUpdateUserInfoParams()
|
||||
|
||||
uprinc, aCtx, err := o.Context.Authorize(r, route)
|
||||
if err != nil {
|
||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
||||
return
|
||||
}
|
||||
if aCtx != nil {
|
||||
r = aCtx
|
||||
*r = *aCtx
|
||||
}
|
||||
var principal *models.Principal
|
||||
if uprinc != nil {
|
||||
@@ -84,7 +83,6 @@ func (o *UpdateUserInfo) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
res := o.Handler.Handle(Params, principal) // actually handle the request
|
||||
|
||||
o.Context.Respond(rw, r, route.Produces, route, res)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user