diff options
author | elijah <elijah@riseup.net> | 2016-12-26 18:25:58 -0800 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2016-12-29 03:10:03 +0100 |
commit | 38fc7da2a9cff329c3b4975d9f01c16c10b572e9 (patch) | |
tree | 90acbc081a959eafac71c64c8cbb483d5b1d1b3c /ui/app/models/account.js | |
parent | 3461fb49985413bb578af511bf0d13efbc25b5b6 (diff) |
[feature] add support for authenticated API to bitmask.js
Diffstat (limited to 'ui/app/models/account.js')
-rw-r--r-- | ui/app/models/account.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/app/models/account.js b/ui/app/models/account.js index e93d757..0251da0 100644 --- a/ui/app/models/account.js +++ b/ui/app/models/account.js @@ -112,6 +112,9 @@ export default class Account { // returns a promise, fullfill is passed account object // static active() { + if (!bitmask.api_token()) { + return new Promise((resolve, reject) => {resolve(null)}) + } return bitmask.bonafide.user.active().then( response => { if (response.user == '<none>') { |