fix(sidebar): use n1_id to verify edgehill server

This commit is contained in:
Evan Morikawa 2016-03-09 20:27:31 -05:00
parent c0a3452a2e
commit ebd2973cf9

View file

@ -6,10 +6,10 @@ module.exports = class ClearbitDataSource
return "https://person.clearbit.com/v2/combined"
find: ({email}) ->
tok = AccountStore.tokenForAccountId(AccountStore.accounts()[0].id)
n1_id = NylasEnv.config.get('updateIdentity')
new Promise (resolve, reject) =>
EdgehillAPI.request
path: "/proxy/clearbit/#{@clearbitAPI()}/find?email=#{email}&api_token=#{tok}",
path: "/proxy/clearbit/#{@clearbitAPI()}/find?email=#{email}&n1_id=#{n1_id}",
success: (body) =>
resolve(@parseResponse(body))
error: reject