- [API] Fixed the loop of getSpells()
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user