From f956cfcf8805f905a93c253d0cb83e2494ad8222 Mon Sep 17 00:00:00 2001 From: logandavis Date: Wed, 2 Mar 2016 17:50:48 -0800 Subject: [PATCH] Allow testing against local auth stack Summary: This commit changes how N1 parses config.cson very slightly so that when "env" is set to "local" N1's auth flow can be tested against local copies of Nylas' auth servers. Test Plan: I tested it manually against a local auth stack. It worked! Reviewers: bengotow Reviewed By: bengotow Subscribers: kav-ya Maniphest Tasks: T6690 Differential Revision: https://phab.nylas.com/D2671 --- src/flux/edgehill-api.coffee | 2 +- src/flux/nylas-api.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flux/edgehill-api.coffee b/src/flux/edgehill-api.coffee index 8e6f1cdb2..6645d8b94 100644 --- a/src/flux/edgehill-api.coffee +++ b/src/flux/edgehill-api.coffee @@ -17,7 +17,7 @@ class EdgehillAPI _onConfigChanged: => env = NylasEnv.config.get('env') - if env is 'development' + if env in ['development', 'local'] @APIRoot = "http://localhost:5009" else if env is 'experimental' @APIRoot = "https://edgehill-experimental.nylas.com" diff --git a/src/flux/nylas-api.coffee b/src/flux/nylas-api.coffee index cb6a4865b..0d4b85aab 100644 --- a/src/flux/nylas-api.coffee +++ b/src/flux/nylas-api.coffee @@ -156,7 +156,7 @@ class NylasAPI @AppID = 'c5dis00do2vki9ib6hngrjs18' @APIRoot = 'https://api-staging-experimental.nylas.com' else if env in ['local'] - @AppID = 'n/a' + @AppID = NylasEnv.config.get('syncEngine.AppID') or 'n/a' @APIRoot = 'http://localhost:5555' else if env in ['custom'] @AppID = NylasEnv.config.get('syncEngine.AppID') or 'n/a'