Moved log-request mw into parent app

- Moved log-request from shared to parent as it is not shared
- This file is only used in one place, this updates the code structure to reflect this
- This is one of many similar changes needed to make it easier to refactor to the existing setup
This commit is contained in:
Hannah Wolfe 2020-04-21 18:28:33 +01:00
parent 8fe56852e0
commit e53baac13d
4 changed files with 2 additions and 5 deletions

View File

@ -22,7 +22,7 @@ module.exports = function setupParentApp(options = {}) {
parentApp.enable('trust proxy');
parentApp.use(mw.requestId);
parentApp.use(shared.middlewares.logRequest);
parentApp.use(mw.logRequest);
// Register event emmiter on req/res to trigger cache invalidation webhook event
parentApp.use(shared.middlewares.emitEvents);

View File

@ -1,3 +1,4 @@
module.exports = {
logRequest: require('./log-request'),
requestId: require('./request-id')
};

View File

@ -39,10 +39,6 @@ module.exports = {
return require('./labs');
},
get logRequest() {
return require('./log-request');
},
get maintenance() {
return require('./maintenance');
},