double oops; impress_user for fancy modeling buttons
This commit is contained in:
parent
8ace3111f7
commit
eba53433be
1 changed files with 10 additions and 3 deletions
|
@ -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
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Reference in a new issue