From 144a3ecb4f610879c12dd10c31a7e310755e4781 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 24 Nov 2015 20:18:57 -0500 Subject: update profile --- StoneIsland/www/js/sdk/account.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'StoneIsland/www/js/sdk/account.js') diff --git a/StoneIsland/www/js/sdk/account.js b/StoneIsland/www/js/sdk/account.js index 5b3b9f1e..fe5f03cd 100644 --- a/StoneIsland/www/js/sdk/account.js +++ b/StoneIsland/www/js/sdk/account.js @@ -47,6 +47,23 @@ sdk.account = (function(){ }) } + account.checkin = function(opt){ + return $.ajax({ + method: "GET", + url: sdk.path("Account.API/1.5", "users/" + auth.user_id + ".json"), + headers: { + "x-yoox-appname": auth.appname, + "x-yoox-account-token": auth.access_token, + }, + data: "{}", + success: function(data){ + auth.user = data.User + opt.success(data) + }, + error: opt.error, + }) + } + account.update = function(opt){ return $.ajax({ method: "PUT", -- cgit v1.2.3-70-g09d2