fix: load quest erorr handling

This commit is contained in:
Chen, Tai-Lin authored and Lin, Hung-Shin committed 2023-11-21 10:48:35 +08:00
1 parent 65894f831a
commit d4da065a95
1 file changed
+2 -2
+2 -2
View File
@@ -38,7 +38,7 @@ export function loadAndUpdateQuests() {
const image = files.includes('Dockerfile') ? id : 'base'
return Quest.findByIdAndUpdate(
return await Quest.findByIdAndUpdate(
id,
{
_id: id,
@@ -50,7 +50,7 @@ export function loadAndUpdateQuests() {
}
)
} catch (error) {
console.error(`Error parsing quest ${id}:`, error)
console.error(`Error parsing quest ${id}:`, error.message)
throw error
}
})