fix(sidebar): use http basic auth to pass token

This commit is contained in:
Evan Morikawa 2016-03-10 14:06:33 -05:00
parent f706d4d80f
commit c38ef2f34a

View file

@ -9,7 +9,10 @@ module.exports = class ClearbitDataSource
tok = AccountStore.tokenForAccountId(AccountStore.accounts()[0].id)
new Promise (resolve, reject) =>
EdgehillAPI.request
path: "/proxy/clearbit/#{@clearbitAPI()}/find?email=#{email}&api_token=#{tok}",
auth:
user: tok
pass: ""
path: "/proxy/clearbit/#{@clearbitAPI()}/find?email=#{email}",
success: (body) =>
resolve(@parseResponse(body))
error: reject