fix(api): fix invalid endpoint create payload

pull/2073/head
Anthony Lapenna 2018-07-26 10:13:18 +02:00
parent ab77f149fa
commit d2702d6d7b
1 changed files with 3 additions and 0 deletions

View File

@ -57,6 +57,9 @@ func (payload *endpointCreatePayload) Validate(r *http.Request) error {
return portainer.Error("Invalid Tags parameter")
}
payload.Tags = tags
if payload.Tags == nil {
payload.Tags = make([]string, 0)
}
useTLS, _ := request.RetrieveBooleanMultiPartFormValue(r, "TLS", true)
payload.TLS = useTLS