Swap background detect from argument to property

I've added boolean support to PropertyControl. This required
working around a bug in axios, that ignored `false` when sent
as the body of a request.
This commit is contained in:
Richard Bowman 2024-01-11 03:01:33 +00:00
parent 3de7aa2fb2
commit f26230efb6
3 changed files with 109 additions and 68 deletions

View file

@ -63,11 +63,9 @@ Vue.mixin({
"writeproperty",
false
);
try {
await axios.put(url, value);
} catch (error) {
this.modalError(error);
}
// NB stringify is needed below, because otherwise boolean
// values get missed.
await axios.put(url, JSON.stringify(value));
},
thingActionUrl(thing, action) {
let url = this.$store.getters["wot/thingActionUrl"](