syncano-server
Advanced tools
Comparing version 0.7.2-9 to 0.7.2-10
@@ -27,3 +27,3 @@ 'use strict'; | ||
this.baseUrl = 'https://' + _settings.SYNCANO_HOST; | ||
this.baseUrl = 'https://' + (0, _settings.getHost)(); | ||
} | ||
@@ -30,0 +30,0 @@ |
@@ -6,3 +6,5 @@ 'use strict'; | ||
}); | ||
var SYNCANO_HOST = exports.SYNCANO_HOST = process.env.SYNCANO_HOST || 'api.syncano.io'; | ||
var getHost = exports.getHost = function getHost() { | ||
return process.env.SYNCANO_HOST || 'api.syncano.io'; | ||
}; | ||
var SYNCANO_API_VERSION = exports.SYNCANO_API_VERSION = 'v2'; |
@@ -30,3 +30,3 @@ 'use strict'; | ||
function buildSyncanoURL() { | ||
return 'https://' + _settings.SYNCANO_HOST + '/' + _settings.SYNCANO_API_VERSION; | ||
return 'https://' + (0, _settings.getHost)() + '/' + _settings.SYNCANO_API_VERSION; | ||
} | ||
@@ -33,0 +33,0 @@ |
{ | ||
"name": "syncano-server", | ||
"version": "0.7.2-9", | ||
"version": "0.7.2-10", | ||
"description": "A library to intereact with the Syncano API on a server side", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
import nodeFetch from 'node-fetch' | ||
import {checkStatus, parseJSON} from './utils' | ||
import {SYNCANO_HOST} from './settings' | ||
import {getHost} from './settings' | ||
export default class QueryBuilder { | ||
constructor() { | ||
this.baseUrl = `https://${SYNCANO_HOST}` | ||
this.baseUrl = `https://${getHost()}` | ||
} | ||
@@ -9,0 +9,0 @@ |
@@ -1,2 +0,4 @@ | ||
export const SYNCANO_HOST = process.env.SYNCANO_HOST || 'api.syncano.io' | ||
export const getHost = function () { | ||
return process.env.SYNCANO_HOST || 'api.syncano.io' | ||
} | ||
export const SYNCANO_API_VERSION = 'v2' |
@@ -1,2 +0,2 @@ | ||
import {SYNCANO_HOST, SYNCANO_API_VERSION} from './settings' | ||
import {getHost, SYNCANO_API_VERSION} from './settings' | ||
@@ -20,3 +20,3 @@ export function checkStatus(response) { | ||
export function buildSyncanoURL() { | ||
return `https://${SYNCANO_HOST}/${SYNCANO_API_VERSION}` | ||
return `https://${getHost()}/${SYNCANO_API_VERSION}` | ||
} | ||
@@ -23,0 +23,0 @@ |
Sorry, the diff of this file is not supported yet
446831
1615