urb.js safety

This commit is contained in:
Anton Dyudin 2015-03-26 13:37:25 -07:00
parent 259311f205
commit fdad073040

View File

@ -14,6 +14,7 @@ window.urb.req = function(method,url,params,json,cb) {
if(json)
xhr.setRequestHeader("content-type", "text/json")
if(!window.urb.oryx) throw "No CSRF token" // XX fetch auth.json
_data = {oryx: window.urb.oryx}
if(params.xyro) { _data.xyro = params.xyro; }
if(params.ship) { _data.ship = params.ship; }