diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-10-29 01:09:10 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-10-29 01:09:10 -0400 |
| commit | bd475ae6ae43cbe1d937ab7c4326ac0dda9bc81f (patch) | |
| tree | 175acdc988ec517e9bf2be73b699c695a237e366 /StoneIsland/www/js/sdk/_sdk.js | |
| parent | fffc000bd73b740318762747c07aa39adca1313a (diff) | |
make proxy work for gets
Diffstat (limited to 'StoneIsland/www/js/sdk/_sdk.js')
| -rw-r--r-- | StoneIsland/www/js/sdk/_sdk.js | 15 |
1 files changed, 12 insertions, 3 deletions
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 +})() |
