Created
March 11, 2021 18:22
-
-
Save rasikag/9820ab78a248672884c9b076332a500e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const user = await em.findOne( | |
User, | |
usernameOrEmail.includes("@") | |
? { email: usernameOrEmail } | |
: { username: usernameOrEmail } | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment