Skip to content

Commit

Permalink
Use headers for PRIVATE-TOKEN
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-norman-rft committed Jun 26, 2015
1 parent de374d8 commit 0b55895
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion lib/ApiBaseHTTP.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@
if (opts.__query == null) {
opts.__query = {};
}
opts.__query.private_token = this.options.token;
opts.headers = {
'PRIVATE-TOKEN': this.options.token
};
return opts;
};

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gitlab",
"version": "1.4.0",
"version": "1.4.1",
"description": "GitLab API Nodejs library.",
"main": "lib/index.js",
"directories": {
Expand All @@ -17,7 +17,7 @@
},
"dependencies": {
"debug": "*",
"slumber": ">=0.5.0"
"slumber": ">=0.7.0"
},
"devDependencies": {
"coffee-script": ">=1.9.1",
Expand Down
2 changes: 1 addition & 1 deletion src/ApiBaseHTTP.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class module.exports.ApiBaseHTTP extends ApiBase

prepare_opts: (opts) =>
opts.__query ?= {}
opts.__query.private_token = @options.token
opts.headers = { 'PRIVATE-TOKEN': @options.token }
return opts

fn_wrapper: (fn) =>
Expand Down

0 comments on commit 0b55895

Please sign in to comment.