Skip to content

Commit ae62ba8

Browse files
committed
GET > POST for resource_show
1 parent f6e14a7 commit ae62ba8

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

ckanext/activityinfo/assets/js/activityinfo-update.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,7 @@
5353
}
5454

5555
function pollResourceStatus(resourceId, statusLabel) {
56-
var headers = { 'Content-Type': 'application/json' };
57-
var csrfToken = getCSRFToken();
58-
if (csrfToken) headers['X-CSRFToken'] = csrfToken;
59-
60-
fetch('/api/action/resource_show', {
61-
method: 'POST',
62-
headers: headers,
63-
body: JSON.stringify({ id: resourceId })
64-
})
56+
fetch('/api/action/resource_show?id=' + encodeURIComponent(resourceId))
6557
.then(function(r) { return r.json(); })
6658
.then(function(data) {
6759
if (!data.success) {

0 commit comments

Comments
 (0)