UsersService: Wait for the DB to find a user

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2020-10-17 21:52:59 +02:00
parent f4c73a8f96
commit 16dfbdd42d
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3

View file

@ -29,7 +29,7 @@ export class UsersService {
}
async getUserByUsername(userName: string): Promise<User> {
const user = this.userRepository.findOne({
const user = await this.userRepository.findOne({
where: { userName: userName },
});
if (user === undefined) {