- [API] Fixed the loop of getSpells()

This commit is contained in:
Alexis
2020-05-21 11:53:55 +02:00
parent 983af14edc
commit 5d466ce4d8
2 changed files with 3 additions and 2 deletions

View File

@@ -41,7 +41,7 @@ INSERT INTO `school` (name, description, id_meta_school) VALUES
-- SPELLS -- SPELLS
/* /*
SCHEMA SCHEMA
(id, name, description, level, charge, cost), (name, description, level, charge, cost, is_ritual),
*/ */
-- LIGHT SPELLS -- LIGHT SPELLS

View File

@@ -38,11 +38,12 @@ const getSpells = () => {
for (let i = 0; i < result.length; i++) { for (let i = 0; i < result.length; i++) {
try { try {
result[i] = await buildSpell(result[i]) result[i] = await buildSpell(result[i])
resolve(result)
} catch (err) { } catch (err) {
reject(err) reject(err)
} }
} }
console.log(result)
resolve(result)
}) })
}) })
} }