Cleanup map api endpoint

This commit is contained in:
Liam 2022-10-19 17:00:19 +01:00
parent 5c117dc216
commit aa11262e3f

View File

@ -11,13 +11,9 @@ export default async function handler(req, res) {
const data = {
// The maps data from the provided map hash
bsr: mapData.id,
songArt:
"http://" +
req.headers.host +
"/api/beatsaver/art/" +
mapHash +
"?ext=" +
mapData.versions[0].coverURL.split("/")[3].split(".")[1],
songArt: `http://${req.headers.host}/api/beatsaver/art/${mapHash}?ext=${
mapData.versions[0].coverURL.split("/")[3].split(".")[1]
}`,
};
res.json({ error: false, data: data });
}