Ensure we await skin readme in metadata endpoint

This commit is contained in:
Jordan Eldredge 2022-07-05 19:35:54 -07:00
parent 759520b3fa
commit 269f9931a3

View File

@ -176,11 +176,16 @@ router.get(
res.status(404).json();
return;
}
const [nsfw, fileName, readme] = await Promise.all([
skin.getIsNsfw(),
skin.getFileName(),
skin.getReadme(),
]);
res.json({
md5: skin.getMd5(),
nsfw: await skin.getIsNsfw(),
fileName: await skin.getFileName(),
readme: skin.getReadme(),
nsfw,
fileName,
readme,
});
})
);