Use postWithToken

Change-Id: I46e27d34bff32b240dc19aa6ef6db1aeddbc3da3
This commit is contained in:
Matthias Mullie 2014-09-16 15:34:01 +02:00 committed by Legoktm
parent a20a33c72d
commit 9b7ef1c05b

View file

@ -20,11 +20,10 @@
} else {
source = 'diff';
}
( new mw.Api ).post( {
( new mw.Api ).postWithToken( 'edit', {
'action' : 'thank',
'rev' : $thankLink.attr( 'data-revision-id' ),
'source' : source,
'token' : mw.user.tokens.values.editToken
'source' : source
} )
.done( function( data ) {
$thankElement.before( mw.message( 'thanks-thanked', mw.user ).escaped() );