diff options
Diffstat (limited to 'StoneIsland/www/js')
| -rw-r--r-- | StoneIsland/www/js/index.js | 2 | ||||
| -rw-r--r-- | StoneIsland/www/js/sdk/_sdk.js | 15 |
2 files changed, 13 insertions, 4 deletions
diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js index 332e780d..a8c36ef1 100644 --- a/StoneIsland/www/js/index.js +++ b/StoneIsland/www/js/index.js @@ -5,7 +5,7 @@ var app = (function(){ app.bind() app.build() - sdk.init({ production: true }) + sdk.init({ env: 'production' }) if (window.cordova) { document.addEventListener('deviceready', app.ready, false) diff --git a/StoneIsland/www/js/sdk/_sdk.js b/StoneIsland/www/js/sdk/_sdk.js index a7ecf6d3..dedcd5f0 100644 --- a/StoneIsland/www/js/sdk/_sdk.js +++ b/StoneIsland/www/js/sdk/_sdk.js @@ -4,8 +4,17 @@ var sdk = (function(){ var endpoint = "https://sandbox.api.yoox.biz/" sdk.init = function(opt){ - if (opt && opt.production) { - endpoint = "https://secure.api.yoox.biz/" + switch (opt.env || "development") { + case "production": + endpoint = "https://secure.api.yoox.biz/" + break + case "test": + endpoint = "http://lvh.me:4567/" + break + case "development": + default: + endpoint = "https://sandbox.api.yoox.biz/" + break } } @@ -23,4 +32,4 @@ var sdk = (function(){ }) return sdk -})()
\ No newline at end of file +})() |
