facg3 / MWM-Shop_Project

2 stars 1 forks source link

Error first callbacks #12

Closed abdhalees closed 6 years ago

abdhalees commented 6 years ago

You're callback here is returning error as first parameter but it's also returning the result as the first parameter. in Error first callbacks if there isn't an error null is passed as a first parameter. e.g. cb(null, res.rows) https://github.com/facg3/MWM-Shop_Project/blob/ed635ae78424fb61b8a6e2ee5c0c38d484307378/src/database/queries.js#L9

MahmoudMH commented 6 years ago

humm, it's make failing the test, we try it on the next project thanks @abdhalees