weldr: update our use of BurntSushi/toml
The old method is deprecated and failing the linter. Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
parent
32f3d3d66e
commit
a3c207945f
2 changed files with 4 additions and 4 deletions
|
|
@ -1902,7 +1902,7 @@ func (api *API) blueprintsNewHandler(writer http.ResponseWriter, request *http.R
|
|||
if contentType[0] == "application/json" {
|
||||
err = json.NewDecoder(request.Body).Decode(&blueprint)
|
||||
} else if contentType[0] == "text/x-toml" {
|
||||
_, err = toml.DecodeReader(request.Body, &blueprint)
|
||||
_, err = toml.NewDecoder(request.Body).Decode(&blueprint)
|
||||
} else {
|
||||
err = errors_package.New("blueprint must be in json or toml format")
|
||||
}
|
||||
|
|
@ -1975,7 +1975,7 @@ func (api *API) blueprintsWorkspaceHandler(writer http.ResponseWriter, request *
|
|||
if contentType[0] == "application/json" {
|
||||
err = json.NewDecoder(request.Body).Decode(&blueprint)
|
||||
} else if contentType[0] == "text/x-toml" {
|
||||
_, err = toml.DecodeReader(request.Body, &blueprint)
|
||||
_, err = toml.NewDecoder(request.Body).Decode(&blueprint)
|
||||
} else {
|
||||
err = errors_package.New("blueprint must be in json or toml format")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue