fix: Set default apiEndpoint to empty

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
Cameron Diver 2018-11-26 15:37:42 +00:00
parent db24961365
commit 940d8c9862
No known key found for this signature in database
GPG Key ID: 49690ED87032539F
2 changed files with 2 additions and 2 deletions

View File

@ -296,7 +296,7 @@ module.exports = class ApplicationManager extends EventEmitter
).get(appId)
getTargetApp: (appId) =>
@config.get('apiEndpoint').then (endpoint = '') ->
@config.get('apiEndpoint').then (endpoint) ->
@db.models('app').where({ appId, source: endpoint }).select()
.then ([ app ]) =>
if !app?

View File

@ -26,7 +26,7 @@ class Config extends EventEmitter {
private providerFunctions: ConfigProviderFunctions;
public schema: ConfigSchema = {
apiEndpoint: { source: 'config.json' },
apiEndpoint: { source: 'config.json', default: '' },
apiTimeout: { source: 'config.json', default: 15 * 60 * 1000 },
listenPort: { source: 'config.json', default: 48484 },
deltaEndpoint: { source: 'config.json', default: 'https://delta.resin.io' },