Refractored call for getUpdates to be more consistent with the others

This commit is contained in:
Djamil Legato
2017-02-16 14:10:35 -08:00
parent 810a263544
commit f886bf4bb8
2 changed files with 4 additions and 5 deletions

View File

@@ -26,8 +26,7 @@ export default class GPM extends EventEmitter {
fetch(callback = () => true, flush = false) {
let data = new FormData();
data.append('task', 'GPM');
data.append('action', this.action);
data.append('admin-nonce', config.admin_nonce);
if (flush) {
data.append('flush', true);
@@ -35,7 +34,7 @@ export default class GPM extends EventEmitter {
this.emit('fetching', this);
fetch(`${config.base_url_relative}.json`, {
fetch(`${config.base_url_relative}/update.json/task:getUpdates`, {
credentials: 'same-origin',
method: 'post',
body: data

File diff suppressed because one or more lines are too long