double oops; impress_user for fancy modeling buttons

This commit is contained in:
Emi Matchu 2014-01-20 16:08:57 -06:00
parent 8ace3111f7
commit eba53433be

View file

@ -32,11 +32,16 @@
}, },
Customization: { Customization: {
request: function(petId, type) { request: function(petId, type) {
var data = {};
if (ImpressUser.id) {
data.impress_user = ImpressUser.id;
}
return $.ajax({ return $.ajax({
dataType: "json", dataType: "json",
type: type, type: type,
url: Neopia.API_URL + "/pets/" + petId + "/customization", url: Neopia.API_URL + "/pets/" + petId + "/customization",
useCSRFProtection: false useCSRFProtection: false,
data: data
}); });
}, },
get: function(petId) { get: function(petId) {
@ -80,7 +85,8 @@
}, },
getNeopetsUsernames: function() { getNeopetsUsernames: function() {
return JSON.parse($('#modeling-neopets-users').attr('data-usernames')); return JSON.parse($('#modeling-neopets-users').attr('data-usernames'));
} },
id: currentUserId
}; };
} else { } else {
return { return {
@ -98,7 +104,8 @@
}, },
getNeopetsUsernames: function() { getNeopetsUsernames: function() {
return JSON.parse(localStorage.getItem(this._key)) || []; return JSON.parse(localStorage.getItem(this._key)) || [];
} },
id: null
}; };
} }
})(); })();