Skip to content
Snippets Groups Projects
Commit f6a43194 authored by Vytor Calixto's avatar Vytor Calixto :space_invader:
Browse files

Change response when no results are found in database

parent 0f956f6a
No related branches found
No related tags found
1 merge request!116Release v1.0.0
Pipeline #
...@@ -8,9 +8,6 @@ function query(req, res, next) { ...@@ -8,9 +8,6 @@ function query(req, res, next) {
log.debug(req.sql.toString()); log.debug(req.sql.toString());
execQuery(sql.text, sql.values).then((result) => { execQuery(sql.text, sql.values).then((result) => {
req.result = result; req.result = result;
if (result.length === 0) {
next({status: 404, message: 'No results found in database'});
}
next(); next();
}, (error) => { }, (error) => {
log.error(error.stack); log.error(error.stack);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment