Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repeated query #43

Open
AlaaTaima opened this issue Mar 4, 2020 · 0 comments
Open

repeated query #43

AlaaTaima opened this issue Mar 4, 2020 · 0 comments
Labels

Comments

@AlaaTaima
Copy link

getUser(value.email).then((result) => result.rows[0].password)
.then((hashedPassword) => bcrypt.compare(value.password, hashedPassword))
.then((result) => {
if (result === true) {
findId(value.email).then((id) => {

Here, the two query return the same data so :
You can use only one query and return the data that you want to use it with bcrypt.compare and with cookie also .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant