feat(api): add api-experimental.nylas.com as login option

This commit is contained in:
Evan Morikawa 2015-07-08 13:25:11 -07:00
parent e8912e0e2e
commit 5067bd3cff
4 changed files with 7 additions and 1 deletions

View file

@ -76,6 +76,7 @@ class LoginPage extends Page
<div className="environment-selector">
<select value={@state.environment} onChange={@_onEnvChange}>
<option value="development">Development (edgehill-dev, api-staging)</option>
<option value="experimental">Experimental (edgehill-staging, api-experimental)</option>
<option value="staging">Staging (edgehill-staging, api-staging)</option>
<option value="production">Production (edgehill, api)</option>
</select>

View file

@ -11,7 +11,7 @@ class NylasApiEnvironmentStore extends NylasStore
getEnvironment: -> atom.config.get('env')
_setEnvironment: (env) ->
throw new Error("Environment #{env} is not allowed") unless env in ['development', 'staging', 'production']
throw new Error("Environment #{env} is not allowed") unless env in ['development', 'experimental', 'staging', 'production']
atom.config.set('env', env)
@trigger()

View file

@ -18,6 +18,8 @@ class EdgehillAPI
if env is 'development'
# @APIRoot = "http://localhost:5009"
@APIRoot = "https://edgehill-dev.nylas.com"
else if env is 'experimental'
@APIRoot = "https://edgehill-staging.nylas.com"
else if env is 'staging'
@APIRoot = "https://edgehill-staging.nylas.com"
else

View file

@ -91,6 +91,9 @@ class NylasAPI
else if env in ['staging', 'development']
@AppID = '54miogmnotxuo5st254trcmb9'
@APIRoot = 'https://api-staging.nylas.com'
else if env in ['experimental']
@AppID = 'c5dis00do2vki9ib6hngrjs18'
@APIRoot = 'https://api-experimental.nylas.com'
current = {@APIToken, @AppID, @APIRoot}