Cleanup map api endpoint
This commit is contained in:
parent
5c117dc216
commit
aa11262e3f
@ -11,13 +11,9 @@ export default async function handler(req, res) {
|
|||||||
const data = {
|
const data = {
|
||||||
// The maps data from the provided map hash
|
// The maps data from the provided map hash
|
||||||
bsr: mapData.id,
|
bsr: mapData.id,
|
||||||
songArt:
|
songArt: `http://${req.headers.host}/api/beatsaver/art/${mapHash}?ext=${
|
||||||
"http://" +
|
mapData.versions[0].coverURL.split("/")[3].split(".")[1]
|
||||||
req.headers.host +
|
}`,
|
||||||
"/api/beatsaver/art/" +
|
|
||||||
mapHash +
|
|
||||||
"?ext=" +
|
|
||||||
mapData.versions[0].coverURL.split("/")[3].split(".")[1],
|
|
||||||
};
|
};
|
||||||
res.json({ error: false, data: data });
|
res.json({ error: false, data: data });
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user