Skip to content

Commit

Permalink
Reverted setupapp middleware order
Browse files Browse the repository at this point in the history
  • Loading branch information
grafitto committed Jan 26, 2021
1 parent cec3e9d commit 6590dee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/api/utils/testingRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ const setUpApp = (
): Application => {
const app: Application = express();
app.use(bodyParser.json());
customMiddleware.forEach(middlewareElement => app.use(middlewareElement));
app.use((req: Request, _res: Response, next: NextFunction) => {
req.emitToSessionSocket = (event: string, ...args: any[]) => iosocket.emit(event, ...args);
next();
});

app.use(languageMiddleware);
customMiddleware.forEach(middlewareElement => app.use(middlewareElement));

route(app);
app.use(errorHandlingMiddleware);
Expand Down

0 comments on commit 6590dee

Please sign in to comment.