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