Skip to content
This repository has been archived by the owner on Oct 19, 2018. It is now read-only.

Commit

Permalink
fix: Wait for actual user insertion before returning response
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaptard committed Apr 15, 2018
1 parent add5f4c commit 3b39b18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion endpoints/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Authentication extends Endpoint {
refresh_token: null,
last_ip: []
}
this.db.collection('users').insertOne(user)
await this.db.collection('users').insertOne(user)
auth.saveIP.bind(this)(user.user_key, ip, 'register', true)

return user.user_key
Expand Down

0 comments on commit 3b39b18

Please sign in to comment.