MXS-1300: Fix logging and maxscale alteration

The alterations to logging and maxscale were sending malformed JSON to
MaxScale. Boolean values weren't converted to JSON booleans but were sent
as strings.
This commit is contained in:
Markus Mäkelä
2017-07-21 09:23:20 +03:00
parent 310ef3b31e
commit 53789f3b4b
2 changed files with 10 additions and 2 deletions

View File

@ -142,6 +142,14 @@ module.exports = function() {
this.updateValue = function(host, resource, key, value) {
var body = {}
// Convert string booleans into JSON booleans
if (value == "true") {
value = true
} else if (value == "false") {
value = false
}
_.set(body, key, value)
return doRequest(host, resource, null, { method: 'PATCH', body: body })
}