add api key param

This commit is contained in:
Dan Zajdband
2012-06-17 19:23:59 -03:00
parent a951072182
commit 6704f819a0

View File

@@ -71,7 +71,6 @@ var execMethod = function(type, params, endpoint, fn){
delete params.id;
if(type === 'post'){
request
.post(base_url + endpoint)
.query({api_key : this.api_key})
@@ -92,9 +91,9 @@ var execMethod = function(type, params, endpoint, fn){
});
} else {
request
.get(base_url + endpoint)
.query({api_key : this.api_key})
.send(params)
.set('Accept', 'application/json')
.end(function(res){
@@ -110,7 +109,5 @@ var execMethod = function(type, params, endpoint, fn){
fn(res.error, null);
}
});
}
};