Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct mimetype for disabling/enabling things call #1151

Merged
merged 3 commits into from
Aug 31, 2021

Conversation

t2000
Copy link
Contributor

@t2000 t2000 commented Aug 30, 2021

Fixes #1150

Signed-off-by: Stefan Triller github@stefantriller.de

Fixes openhab#1150

Signed-off-by: Stefan Triller <github@stefantriller.de>
@t2000 t2000 requested a review from a team as a code owner August 30, 2021 16:40
@lolodomo
Copy link
Contributor

I let @ghys review, I don't know why the media type is doubled.

@digitaldan
Copy link
Contributor

I let @ghys review, I don't know why the media type is doubled.

The first argument is the 'dataType', which is what you are expecting back from the server, the second is "contentType", the content type you are sending.

See

putPlain (uri, data, dataType, contentType) {

Signed-off-by: Stefan Triller <github@stefantriller.de>
Copy link
Member

@ghys ghys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this!
Could you please also change it here (you can enable/disable multiple things at once from the list):

const promises = this.selectedItems.map((i) => this.$oh.api.putPlain('/rest/things/' + i + '/enable', enable.toString(), 'application/json', 'application/json'))

Signed-off-by: Stefan Triller <github@stefantriller.de>
@t2000
Copy link
Contributor Author

t2000 commented Aug 31, 2021

Could you please also change it here (you can enable/disable multiple things at once from the list):

const promises = this.selectedItems.map((i) => this.$oh.api.putPlain('/rest/things/' + i + '/enable', enable.toString(), 'application/json', 'application/json'))

Done

Copy link
Member

@ghys ghys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again!

@relativeci
Copy link

relativeci bot commented Aug 31, 2021

Job #191: Bundle Size — 10.49MB (~-0.01%).

483b750 vs d22cdeb

Changed metrics (2/8)
Metric Current Baseline
Initial JS 1.63MB(~+0.01%) 1.63MB
Cache Invalidation 18.17% 15.73%
Changed assets by type (1/7)
            Current     Baseline
JS 8.23MB (~-0.01%) 8.23MB

View Job #191 report on app.relative-ci.com

@ghys ghys merged commit 60fd5f3 into openhab:main Aug 31, 2021
@t2000 t2000 deleted the fixThingDisabling branch August 31, 2021 17:34
@kaikreuzer kaikreuzer added the bug Something isn't working label Sep 5, 2021
@kaikreuzer kaikreuzer added this to the 3.2 milestone Sep 5, 2021
@kaikreuzer kaikreuzer changed the title Bugfix: Correct mimetype for disabling/enabling things call Correct mimetype for disabling/enabling things call Sep 5, 2021
@ghys ghys added the main ui Main UI label Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working main ui Main UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable Things via MainUI not working in latest SNAPSHOT (30.08.2021)
5 participants