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

Good use of db queires #9

Open
jcharnley opened this issue Apr 19, 2019 · 1 comment
Open

Good use of db queires #9

jcharnley opened this issue Apr 19, 2019 · 1 comment

Comments

@jcharnley
Copy link

A better way to use an augment via a parameter.

Use template literals

example---

const loginQuery = (username, cb) => {
dbConnection.query(SELECT password FROM users where username = ${username}, (err, res) => {

@jokosanyang
Copy link
Contributor

We were told it was safer to protect against attacks to avoid using direct template literals in queries. :/

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

No branches or pull requests

2 participants