Skip to content

Commit 1c07793

Browse files
committed
removes next() calls in PromiseRouter
1 parent 41853a0 commit 1c07793

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/PromiseRouter.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ function makeExpressHandler(appId, promiseHandler) {
160160

161161
if (result.text) {
162162
res.send(result.text);
163-
return next();
163+
return;
164164
}
165165

166166
if (result.location) {
@@ -169,7 +169,7 @@ function makeExpressHandler(appId, promiseHandler) {
169169
// as it double encodes %encoded chars in URL
170170
if (!result.response) {
171171
res.send('Found. Redirecting to '+result.location);
172-
return next();
172+
return;
173173
}
174174
}
175175
if (result.headers) {
@@ -178,7 +178,6 @@ function makeExpressHandler(appId, promiseHandler) {
178178
})
179179
}
180180
res.json(result.response);
181-
next();
182181
}, (e) => {
183182
log.error(`Error generating response. ${inspect(e)}`, {error: e});
184183
next(e);

0 commit comments

Comments
 (0)