Skip to content

Commit

Permalink
Fix mimetype for disabling/enabling things (#1151)
Browse files Browse the repository at this point in the history
Fixes #1150.

Signed-off-by: Stefan Triller <github@stefantriller.de>
  • Loading branch information
t2000 committed Aug 31, 2021
1 parent cf9ae4a commit 60fd5f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ export default {
},
toggleDisabled () {
const enable = (this.thing.statusInfo.statusDetail === 'DISABLED')
this.$oh.api.putPlain('/rest/things/' + this.thingId + '/enable', enable.toString(), 'application/json', 'application/json').then((data) => {
this.$oh.api.putPlain('/rest/things/' + this.thingId + '/enable', enable.toString()).then((data) => {
this.$f7.toast.create({
text: (enable) ? 'Thing enabled' : 'Thing disabled',
destroyOnClose: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ export default {
doDisableEnableSelected (enable) {
let dialog = this.$f7.dialog.progress('Please Wait...')
const promises = this.selectedItems.map((i) => this.$oh.api.putPlain('/rest/things/' + i + '/enable', enable.toString(), 'application/json', 'application/json'))
const promises = this.selectedItems.map((i) => this.$oh.api.putPlain('/rest/things/' + i + '/enable', enable.toString()))
Promise.all(promises).then((data) => {
this.$f7.toast.create({
text: (enable) ? 'Things enabled' : 'Things disabled',
Expand Down

0 comments on commit 60fd5f3

Please sign in to comment.