If you don't have return cb(err) whenever you have if statements for errors then res.end() is called twice and anything in the body is run with no data... This will break your app!
Always either return (my recommendation) before errors or make the error's if statement have an else case.
https://github.com/FACN3/prioritiseMe/blob/master/src/handler.js#L23
https://github.com/FACN3/prioritiseMe/blob/master/src/handler.js#L37
https://github.com/FACN3/prioritiseMe/blob/master/src/handler.js#L44
https://github.com/FACN3/prioritiseMe/blob/master/src/handler.js#L53
If you don't have
return cb(err)whenever you have if statements for errors thenres.end()is called twice and anything in the body is run with no data... This will break your app!Always either
return(my recommendation) before errors or make the error's if statement have anelsecase.https://github.com/FACN3/prioritiseMe/blob/master/src/handler.js#L23
https://github.com/FACN3/prioritiseMe/blob/master/src/handler.js#L37
https://github.com/FACN3/prioritiseMe/blob/master/src/handler.js#L44
https://github.com/FACN3/prioritiseMe/blob/master/src/handler.js#L53