diff --git a/src/auth/AuthGuard.ts b/src/auth/AuthGuard.ts index 5a0d380..e43dd57 100644 --- a/src/auth/AuthGuard.ts +++ b/src/auth/AuthGuard.ts @@ -65,10 +65,10 @@ export default abstract class AuthGuard
> { await MysqlConnectionManager.wrapTransaction(async connection => { user = User.create({}); + await user.save(connection, c => callbacks.push(c)); if (onRegister) { (await onRegister(connection, user)).forEach(c => callbacks.push(c)); } - await user.save(connection, c => callbacks.push(c)); }); for (const callback of callbacks) {