mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +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 {
|
||||
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) {
|
||||
callback({
|
||||
status: status,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user