Skip to content

Commit bad1fe3

Browse files
authored
Fix variable name conflict in Express example (#143)
1 parent 6198820 commit bad1fe3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/guides/1-project-structure.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ That's it. But now everywhere else in my application instead of requiring `pg` d
4949
const db = require('../db')
5050

5151
app.get('/:id', (req, res, next) => {
52-
db.query('SELECT * FROM users WHERE id = $1', [req.params.id], (err, res) => {
52+
db.query('SELECT * FROM users WHERE id = $1', [req.params.id], (err, result) => {
5353
if (err) {
5454
return next(err)
5555
}
56-
res.send(res.rows[0])
56+
res.send(result.rows[0])
5757
})
5858
})
5959

0 commit comments

Comments
 (0)