diff options
Diffstat (limited to 'StoneIsland/www')
| -rw-r--r-- | StoneIsland/www/js/index.js | 2 | ||||
| -rw-r--r-- | StoneIsland/www/js/sdk/_sdk.js | 16 |
2 files changed, 14 insertions, 4 deletions
diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js index 332e780d..e0b08351 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: "test" }) 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..31fd96ca 100644 --- a/StoneIsland/www/js/sdk/_sdk.js +++ b/StoneIsland/www/js/sdk/_sdk.js @@ -1,11 +1,21 @@ var sdk = (function(){ var sdk = {} - var endpoint = "https://sandbox.api.yoox.biz/" + var endpoint = "https://secure.api.yoox.biz/" + // var endpoint = "http://api.yoox.biz/" sdk.init = function(opt){ - if (opt && opt.production) { - endpoint = "https://secure.api.yoox.biz/" + switch (opt.env) { + case 'test': + endpoint = "http://lvh.me:9090/" + break + default: + case 'development': + endpoint = "http://api.yoox.biz/" + break + case 'production': + endpoint = "https://secure.api.yoox.biz/" + break } } |
