From 269f9931a37717310d576d8b3293e4ce9796e2cc Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Tue, 5 Jul 2022 19:35:54 -0700 Subject: [PATCH] Ensure we await skin readme in metadata endpoint --- packages/skin-database/api/router.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/skin-database/api/router.ts b/packages/skin-database/api/router.ts index 9d03261c..13230e07 100644 --- a/packages/skin-database/api/router.ts +++ b/packages/skin-database/api/router.ts @@ -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, }); }) );