Skip to content

Commit d2e6828

Browse files
authored
Await validPassword
validPassword [returns a promise](https://github.com/clintonwoo/hackernews-react-graphql/blob/master/src/data/models/User.js#L36-L40) which must therefore be `await`ed
1 parent 270fe41 commit d2e6828

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ app.prepare()
5151
if (!user) {
5252
return done(null, false, { message: 'Incorrect username.' });
5353
}
54-
if (!User.validPassword(username, password)) {
54+
if (!(await User.validPassword(username, password))) {
5555
return done(null, false, { message: 'Incorrect password.' });
5656
}
5757
return done(null, user);

0 commit comments

Comments
 (0)