mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-22 16:01:16 +01:00
use "" instead of "." for null hashes
This commit is contained in:
parent
ec0840794b
commit
6b4fcb9aea
@ -116,8 +116,8 @@ exp.save_hash = function(rid, userId, skin_hash, cape_hash, callback) {
|
|||||||
logging.log(rid + "cache: saving skin:" + skin_hash + " cape:" + cape_hash);
|
logging.log(rid + "cache: saving skin:" + skin_hash + " cape:" + cape_hash);
|
||||||
var time = new Date().getTime();
|
var time = new Date().getTime();
|
||||||
// store shorter null byte instead of "null"
|
// store shorter null byte instead of "null"
|
||||||
skin_hash = (skin_hash === null ? "." : skin_hash);
|
skin_hash = (skin_hash === null ? "" : skin_hash);
|
||||||
cape_hash = (cape_hash === null ? "." : cape_hash);
|
cape_hash = (cape_hash === null ? "" : cape_hash);
|
||||||
// store userId in lower case if not null
|
// store userId in lower case if not null
|
||||||
userId = userId && userId.toLowerCase();
|
userId = userId && userId.toLowerCase();
|
||||||
if (skin_hash === undefined) {
|
if (skin_hash === undefined) {
|
||||||
@ -152,8 +152,8 @@ exp.get_details = function(userId, callback) {
|
|||||||
var details = null;
|
var details = null;
|
||||||
if (data) {
|
if (data) {
|
||||||
details = {
|
details = {
|
||||||
skin: (!data.s || data.s === ".") ? null : data.s,
|
skin: (!data.s || data.s === "") ? null : data.s,
|
||||||
cape: (!data.c || data.c === ".") ? null : data.c,
|
cape: (!data.c || data.c === "") ? null : data.c,
|
||||||
time: Number(data.t)
|
time: Number(data.t)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user