mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-22 07:51:17 +01:00
invalidate cache when skin file is gone
This commit is contained in:
parent
3cdcccde57
commit
c8dad9dfbb
@ -53,6 +53,13 @@ module.exports = function(req, callback) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
helpers.get_skin(rid, userId, function(err, hash, status, image) {
|
helpers.get_skin(rid, userId, function(err, hash, status, image) {
|
||||||
|
if (err) {
|
||||||
|
logging.error(req.id, err);
|
||||||
|
if (err.code === "ENOENT") {
|
||||||
|
// no such file
|
||||||
|
cache.remove_hash(req.id, userId);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (image) {
|
if (image) {
|
||||||
callback({
|
callback({
|
||||||
status: status,
|
status: status,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user