Skip to content

Commit

Permalink
Merge pull request #7 from ABI-Deployment-Thesis/ruiar/fix-logger-error
Browse files Browse the repository at this point in the history
fix(logger): fix logger error when creating admin account
  • Loading branch information
ruigomes99 authored Aug 30, 2024
2 parents 0bd021f + 4b2bb73 commit 5d43f8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/mongodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const init = async function () {
})
await admin.save()
} catch (err) {
if (err.code === 11000 && err.keyPattern.email)
if (err.code === 11000)
logger.debug('admin account already exists')
else
logger.error(err)
Expand Down

0 comments on commit 5d43f8c

Please sign in to comment.