Save images to the old path as well for now

I think people tend to leave the site open in a tab for days/weeks at a time, so if anyone has the site open for a while and some new gear comes out this will let them continue to see the image with the old version of the site JS.
This commit is contained in:
Matt Isenhower
2017-11-24 13:53:19 -08:00
parent a329e5d28d
commit 589a6542ec

View File

@@ -113,6 +113,11 @@ class Updater {
let splatnet = new SplatNet;
let image = await this.handleRequest(splatnet.getImage(imagePath));
this.writeFile(localPath, image);
// Temporary: Also save the file to the old path for now
// This allows for old versions of the site to continue downloading images
let oldPath = path.resolve('public/assets/img/splatnet') + '/' + path.basename(imagePath);
this.writeFile(oldPath, image);
} catch (e) { }
}