mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-22 08:16:09 +08:00
feat(k2): nylas api only uses localhost
This commit is contained in:
parent
5a63b377be
commit
f6d32e60f7
|
@ -61,7 +61,7 @@ class NylasAPI
|
||||||
@_onConfigChanged()
|
@_onConfigChanged()
|
||||||
|
|
||||||
_onConfigChanged: =>
|
_onConfigChanged: =>
|
||||||
prev = {@AppID, @APIRoot, @APITokens}
|
@APIRoot = 'http://localhost:5100'
|
||||||
|
|
||||||
if NylasEnv.inSpecMode()
|
if NylasEnv.inSpecMode()
|
||||||
@pluginsSupported = true
|
@pluginsSupported = true
|
||||||
|
@ -74,27 +74,7 @@ class NylasAPI
|
||||||
console.warn("NylasAPI: config file does not contain an environment \
|
console.warn("NylasAPI: config file does not contain an environment \
|
||||||
value. Defaulting to `production`.")
|
value. Defaulting to `production`.")
|
||||||
|
|
||||||
if env in ['production']
|
current = {@APIRoot, @APITokens}
|
||||||
@AppID = 'eco3rpsghu81xdc48t5qugwq7'
|
|
||||||
@APIRoot = 'https://api.nylas.com'
|
|
||||||
@pluginsSupported = true
|
|
||||||
else if env in ['staging', 'development']
|
|
||||||
@AppID = '54miogmnotxuo5st254trcmb9'
|
|
||||||
@APIRoot = 'https://api-staging.nylas.com'
|
|
||||||
@pluginsSupported = true
|
|
||||||
else if env in ['experimental']
|
|
||||||
@AppID = 'c5dis00do2vki9ib6hngrjs18'
|
|
||||||
@APIRoot = 'https://api-staging-experimental.nylas.com'
|
|
||||||
@pluginsSupported = true
|
|
||||||
else if env in ['k2']
|
|
||||||
@AppID = 'k2'
|
|
||||||
@APIRoot = 'http://localhost:5100'
|
|
||||||
else if env in ['custom', 'local']
|
|
||||||
@AppID = NylasEnv.config.get('syncEngine.AppID') or 'n/a'
|
|
||||||
@APIRoot = NylasEnv.config.get('syncEngine.APIRoot') or 'http://localhost:5555'
|
|
||||||
@pluginsSupported = false
|
|
||||||
|
|
||||||
current = {@AppID, @APIRoot, @APITokens}
|
|
||||||
|
|
||||||
# Delegates to node's request object.
|
# Delegates to node's request object.
|
||||||
# On success, it will call the passed in success callback with options.
|
# On success, it will call the passed in success callback with options.
|
||||||
|
|
Loading…
Reference in a new issue