mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-11-15 02:54:23 +00:00
Use postWithToken
Change-Id: I46e27d34bff32b240dc19aa6ef6db1aeddbc3da3
This commit is contained in:
parent
a20a33c72d
commit
9b7ef1c05b
|
@ -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() );
|
||||
|
|
Loading…
Reference in a new issue