mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-02-22 22:51:10 +01:00
Refractored call for getUpdates to be more consistent with the others
This commit is contained in:
@@ -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
|
||||
|
||||
4
themes/grav/js/admin.min.js
vendored
4
themes/grav/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user