Skip to content

Commit

Permalink
lib: add support for usertokens
Browse files Browse the repository at this point in the history
  • Loading branch information
tflanagan committed Jul 8, 2016
1 parent 10fcc10 commit 13457a6
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quickbase",
"version": "2.6.0",
"version": "2.7.0",
"description": "A lightweight, very flexible QuickBase API",
"keywords": [
"QuickBase",
Expand Down
2 changes: 1 addition & 1 deletion quickbase.browserify.min.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions quickbase.es5.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ var defaults = {
username: '',
password: '',
appToken: '',
userToken: '',
ticket: '',

flags: {
Expand Down Expand Up @@ -404,6 +405,10 @@ var QueryBuilder = function () {
this.options.apptoken = this.settings.appToken;
}

if (!this.options.hasOwnProperty('userToken') && this.settings.userToken) {
this.options.usertoken = this.settings.userToken;
}

if (!this.options.hasOwnProperty('ticket') && this.settings.ticket) {
this.options.ticket = this.settings.ticket;
}
Expand Down
5 changes: 5 additions & 0 deletions quickbase.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const defaults = {
username: '',
password: '',
appToken: '',
userToken: '',
ticket: '',

flags: {
Expand Down Expand Up @@ -365,6 +366,10 @@ class QueryBuilder {
this.options.apptoken = this.settings.appToken;
}

if (!this.options.hasOwnProperty('userToken') && this.settings.userToken) {
this.options.usertoken = this.settings.userToken;
}

if (!this.options.hasOwnProperty('ticket') && this.settings.ticket) {
this.options.ticket = this.settings.ticket;
}
Expand Down
14 changes: 7 additions & 7 deletions quickbase.sa.min.js

Large diffs are not rendered by default.

0 comments on commit 13457a6

Please sign in to comment.