summaryrefslogtreecommitdiff
path: root/StoneIsland
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-11-24 18:03:58 -0500
committerJules Laplace <jules@okfoc.us>2015-11-24 18:03:58 -0500
commit5feeefffa62b131baff63e3241441727cf956fb6 (patch)
treebf1f14d8886bbf581bc463ccd3153c17a4499ea5 /StoneIsland
parent19368b556a580625d7457167d0869af6ceeac18c (diff)
update user / update_mail_and_password apis
Diffstat (limited to 'StoneIsland')
-rw-r--r--StoneIsland/www/index.html2
-rw-r--r--StoneIsland/www/js/sdk/account.js32
2 files changed, 33 insertions, 1 deletions
diff --git a/StoneIsland/www/index.html b/StoneIsland/www/index.html
index 3db92d33..79543f97 100644
--- a/StoneIsland/www/index.html
+++ b/StoneIsland/www/index.html
@@ -330,7 +330,7 @@
<input type="email" name="Email" placeholder="EMAIL ADDRESS" required>
<input type="email" name="ConfirmEmail" placeholder="CONFIRM EMAIL ADDRESS" required>
<!-- NOTE: mm/dd/yyyy is pushed over to the left because of the dropdown arrow -->
- <input type="text" onfocus="(this.type='date')" name="Birthday" placeholder="BIRTHDAY (MM/DD/YYYY)" required>
+ <input type="text" onfocus="(this.type='date')" name="BirthDay" placeholder="BIRTHDAY (MM/DD/YYYY)" required>
<div class="select-wrapper">
<span>GENDER</span>
diff --git a/StoneIsland/www/js/sdk/account.js b/StoneIsland/www/js/sdk/account.js
index 3b48b0d9..5b3b9f1e 100644
--- a/StoneIsland/www/js/sdk/account.js
+++ b/StoneIsland/www/js/sdk/account.js
@@ -47,6 +47,38 @@ sdk.account = (function(){
})
}
+ account.update = function(opt){
+ return $.ajax({
+ method: "PUT",
+ 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: JSON.stringify( opt.data ),
+ success: function(data){
+ opt.success(data)
+ },
+ error: opt.error,
+ })
+ }
+
+ account.update_mail_and_password = function(opt){
+ return $.ajax({
+ method: "PUT",
+ url: sdk.path("Account.API/1.5", "auth/" + auth.user_id + ".json"),
+ headers: {
+ "x-yoox-appname": auth.appname,
+ "x-yoox-account-token": auth.access_token,
+ },
+ data: JSON.stringify( opt.data ),
+ success: function(data){
+ opt.success(data)
+ },
+ error: opt.error,
+ })
+ }
+
return account
})()