mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 17:51:09 +00:00
Remove unnecessary contentType: 'multipart/form-data'
from an API query
This was copied from somewhere else (probably VisualEditor), but it is not needed here. Using the multipart/form-data encoding is beneficial when sending long binary data (such as the compressed HTML VisualEditor sends), and is also required when uploading files, but it is not helpful when sending a short query like we do here. Also rename a variable. Change-Id: I9bcce2ce1ca7c218e4cd147960d1070dd23ea9fa
This commit is contained in:
parent
4c103576e8
commit
a129899971
|
@ -271,8 +271,8 @@ function initTopicSubscriptions( $container ) {
|
|||
page: title,
|
||||
commentname: commentName,
|
||||
subscribe: !isSubscribed
|
||||
}, { contentType: 'multipart/form-data' } ).then( function ( response2 ) {
|
||||
return OO.getProp( response2, 'discussiontoolssubscribe' ) || {};
|
||||
} ).then( function ( response ) {
|
||||
return OO.getProp( response, 'discussiontoolssubscribe' ) || {};
|
||||
} ).then( function ( result ) {
|
||||
if ( result.subscribe ) {
|
||||
element.setAttribute( 'data-mw-subscribed', '' );
|
||||
|
|
Loading…
Reference in a new issue