mirror of
https://github.com/openziti/zrok.git
synced 2025-08-17 19:31:12 +02:00
invite token generate lint (#834)
This commit is contained in:
@ -12,8 +12,6 @@ import (
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/runtime/middleware"
|
||||
"github.com/go-openapi/validate"
|
||||
|
||||
"github.com/openziti/zrok/rest_model_zrok"
|
||||
)
|
||||
|
||||
// NewInviteTokenGenerateParams creates a new InviteTokenGenerateParams object
|
||||
@ -36,7 +34,7 @@ type InviteTokenGenerateParams struct {
|
||||
/*
|
||||
In: body
|
||||
*/
|
||||
Body *rest_model_zrok.InviteTokenGenerateRequest
|
||||
Body InviteTokenGenerateBody
|
||||
}
|
||||
|
||||
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
|
||||
@ -50,7 +48,7 @@ func (o *InviteTokenGenerateParams) BindRequest(r *http.Request, route *middlewa
|
||||
|
||||
if runtime.HasBody(r) {
|
||||
defer r.Body.Close()
|
||||
var body rest_model_zrok.InviteTokenGenerateRequest
|
||||
var body InviteTokenGenerateBody
|
||||
if err := route.Consumer.Consume(r.Body, &body); err != nil {
|
||||
res = append(res, errors.NewParseError("body", "body", "", err))
|
||||
} else {
|
||||
@ -65,7 +63,7 @@ func (o *InviteTokenGenerateParams) BindRequest(r *http.Request, route *middlewa
|
||||
}
|
||||
|
||||
if len(res) == 0 {
|
||||
o.Body = &body
|
||||
o.Body = body
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user