feat(costumes): check if emblems exists

This commit is contained in:
Nemesis 2023-02-19 20:21:29 +01:00
parent 3a4b4f7b51
commit d2459492c3
1 changed files with 5 additions and 0 deletions

View File

@ -20,6 +20,11 @@ const { data: emblems } = await fetch(
process.exit(1);
});
if (!emblems || emblems.length === 0) {
console.error(`Got 0 emblems from "${env.STRAPI_BASE_API_URL}/rein-emblems". You may want to run "npm run import:emblems".`)
process.exit(1);
}
let costumes = [];
try {