mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
move comment to proper position
This commit is contained in:
parent
16fdf8d1ac
commit
6a84c5a1d0
@ -209,6 +209,8 @@ exp.get_image_hash = function(rid, userId, type, callback) {
|
|||||||
}
|
}
|
||||||
store_images(rid, userId, details, type, function(err, new_hash) {
|
store_images(rid, userId, details, type, function(err, new_hash) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
// we might have a hash although an error occured
|
||||||
|
// (e.g. Mojang servers not reachable, using outdated hash)
|
||||||
callback(err, -1, details && hash);
|
callback(err, -1, details && hash);
|
||||||
} else {
|
} else {
|
||||||
var status = details && (hash === new_hash) ? 3 : 2;
|
var status = details && (hash === new_hash) ? 3 : 2;
|
||||||
@ -241,8 +243,6 @@ exp.get_avatar = function(rid, userId, helm, size, callback) {
|
|||||||
if (img_err) {
|
if (img_err) {
|
||||||
callback(img_err, -1, null, skin_hash);
|
callback(img_err, -1, null, skin_hash);
|
||||||
} else {
|
} else {
|
||||||
// we might have a hash although an error occured
|
|
||||||
// (e.g. Mojang servers not reachable, using outdated hash)
|
|
||||||
callback(err, (err ? -1 : status), result, skin_hash);
|
callback(err, (err ? -1 : status), result, skin_hash);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user