This commit is contained in:
Timo Hocker 2020-03-10 07:24:41 +01:00
parent 6e529676fe
commit 975f527172

View File

@ -33,7 +33,7 @@ function get_handler ({ module_folder, file, opts, rethrow }) {
const handler = require (path.join (process.cwd (), module_folder, file));
return (req, res, next) => {
new Promise ((res) => res(handler (req, res, next, opts)))
new Promise ((resolve) => resolve (handler (req, res, next, opts)))
.catch ((e) => {
if (rethrow)
throw e;