Fixed session param bug
This commit is contained in:
parent
9d7770b282
commit
08295f01aa
|
@ -20,7 +20,7 @@ class Session
|
||||||
|
|
||||||
query: (url, params, callback) ->
|
query: (url, params, callback) ->
|
||||||
q_params = @vk_params
|
q_params = @vk_params
|
||||||
for attr in params
|
$.each params, (key, val) ->
|
||||||
q_params[attr] = params[attr]
|
q_params[key] = val
|
||||||
$.post url, q_params, callback
|
$.post url, q_params, callback
|
||||||
false
|
false
|
||||||
|
|
|
@ -22,12 +22,11 @@ Session = (function() {
|
||||||
return this.user;
|
return this.user;
|
||||||
};
|
};
|
||||||
Session.prototype.query = function(url, params, callback) {
|
Session.prototype.query = function(url, params, callback) {
|
||||||
var attr, q_params, _i, _len;
|
var q_params;
|
||||||
q_params = this.vk_params;
|
q_params = this.vk_params;
|
||||||
for (_i = 0, _len = params.length; _i < _len; _i++) {
|
$.each(params, function(key, val) {
|
||||||
attr = params[_i];
|
return q_params[key] = val;
|
||||||
q_params[attr] = params[attr];
|
});
|
||||||
}
|
|
||||||
$.post(url, q_params, callback);
|
$.post(url, q_params, callback);
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue