fix(admin): await user.save() without callback in createAdmin
Release / build-and-push (push) Successful in 1m14s

Mongoose 7 removed callback support on Model.prototype.save(),
so the seeder threw 'no longer accepts a callback' on every
boot (caught and logged, non-fatal, but noisy and the success
path never ran). Await the promise and log on success.
This commit is contained in:
2026-09-05 22:48:53 -04:00
parent 39f1c88255
commit 0adf0bd51f
+1 -5
View File
@@ -33,12 +33,8 @@ const createAdmin = async () => {
gamesToAccess: [],
})
await user.save((err) => {
await user.save()
console.log('Admin user successfully created')
if (err) {
return console.error('Could not save admin user')
}
})
} catch (err) {
return console.error(
'Server Error: Could not create admin user' + err.message