Move song art cache

This commit is contained in:
Liam 2022-10-19 17:33:56 +01:00
parent 1ec8577d63
commit 2af984d395
2 changed files with 8 additions and 6 deletions

@ -2,12 +2,7 @@ import fs from "fs";
import fetch from "node-fetch";
import path from "path";
import sharp from "sharp";
const cacheDir = process.cwd() + path.sep + "cache";
if (!fs.existsSync(cacheDir)) {
fs.mkdirSync(cacheDir);
console.log("Created cache directory");
}
import cacheDir from "../../../../src/caches/SongArtCacheDir";
export default async function handler(req, res) {
const mapHash = req.query.hash.replace("custom_level_", "").toLowerCase();

@ -0,0 +1,7 @@
const cacheDir = process.cwd() + path.sep + "cache";
if (!fs.existsSync(cacheDir)) {
fs.mkdirSync(cacheDir);
console.log("Created art cache directory");
}
module.exports = cacheDir;