added error checking for name collision on frontend and send corresponding error

This commit is contained in:
Cam Otts
2023-02-01 13:13:15 -06:00
parent cd28970f13
commit 9aba5f3524
7 changed files with 121 additions and 1 deletions

View File

@ -58,6 +58,31 @@ func (o *CreateFrontendCreated) WriteResponse(rw http.ResponseWriter, producer r
}
}
// CreateFrontendBadRequestCode is the HTTP code returned for type CreateFrontendBadRequest
const CreateFrontendBadRequestCode int = 400
/*
CreateFrontendBadRequest bad request
swagger:response createFrontendBadRequest
*/
type CreateFrontendBadRequest struct {
}
// NewCreateFrontendBadRequest creates CreateFrontendBadRequest with default headers values
func NewCreateFrontendBadRequest() *CreateFrontendBadRequest {
return &CreateFrontendBadRequest{}
}
// WriteResponse to the client
func (o *CreateFrontendBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(400)
}
// CreateFrontendUnauthorizedCode is the HTTP code returned for type CreateFrontendUnauthorized
const CreateFrontendUnauthorizedCode int = 401