pass on caching status information foor 3D renders

this was falsely always set to 2, indicating the skin was downloaded, even when it was cached
This commit is contained in:
jomo 2020-07-13 00:41:21 +02:00
parent 624bf0e338
commit 265a98d404

View File

@ -324,7 +324,7 @@ function get_type(overlay, body) {
}
// handles creations of 3D renders
// callback: error, skin hash, image buffer
// callback: error, status, skin hash, image buffer
exp.get_render = function(rid, userId, scale, overlay, body, callback) {
exp.get_skin(rid, userId, function(err, skin_hash, status, img, slim) {
if (!skin_hash) {
@ -350,7 +350,7 @@ exp.get_render = function(rid, userId, scale, overlay, body, callback) {
callback(null, 0, skin_hash, null);
} else {
fs.writeFile(renderpath, drawn_img, "binary", function(write_err) {
callback(write_err, 2, skin_hash, drawn_img);
callback(write_err, status, skin_hash, drawn_img);
});
}
});