Legoktm has uploaded a new change for review.
https://gerrit.wikimedia.org/r/233640
Change subject: Use mw.Api#postWithToken for echomarkseen requests
......................................................................
Use mw.Api#postWithToken for echomarkseen requests
Change-Id: I9ed7bbd3ffc066a5c01fbd71a4b3342dcf0de864
---
M modules/ooui/mw.echo.ui.NotificationsWidget.js
1 file changed, 2 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo
refs/changes/40/233640/1
diff --git a/modules/ooui/mw.echo.ui.NotificationsWidget.js
b/modules/ooui/mw.echo.ui.NotificationsWidget.js
index 985bb8a..6835578 100644
--- a/modules/ooui/mw.echo.ui.NotificationsWidget.js
+++ b/modules/ooui/mw.echo.ui.NotificationsWidget.js
@@ -318,9 +318,8 @@
mw.echo.ui.NotificationsWidget.prototype.updateSeenTime = function () {
var widget = this;
- return this.api.post( {
- action: 'echomarkseen',
- token: mw.user.tokens.get( 'editToken' )
+ return this.api.postWithToken( 'edit', {
+ action: 'echomarkseen'
} ).then( function ( data ) {
var time = data.query.echomarkseen.timestamp;
--
To view, visit https://gerrit.wikimedia.org/r/233640
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ed7bbd3ffc066a5c01fbd71a4b3342dcf0de864
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits