projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Append xsrf_token if defined to API calls.
[platal.git]
/
htdocs
/
javascript
/
core.js
diff --git
a/htdocs/javascript/core.js
b/htdocs/javascript/core.js
index
3a79984
..
d863c56
100644
(file)
--- a/
htdocs/javascript/core.js
+++ b/
htdocs/javascript/core.js
@@
-112,6
+112,10
@@
onSuccess = payload;
}
+ if ($.xsrf_token) {
+ apicall += '?token=' + $.xsrf_token;
+ }
+
return $.ajax(ajaxParams(onSuccess, onError, {
url: $.plURL('api/' + $.xapiVersion + '/' + apicall),
type: 'POST',