mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Moved emit-events mw into parent app
- Moved emit-events 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:
parent
e53baac13d
commit
295eac6ea1
4 changed files with 2 additions and 5 deletions
|
@ -25,7 +25,7 @@ module.exports = function setupParentApp(options = {}) {
|
|||
parentApp.use(mw.logRequest);
|
||||
|
||||
// Register event emmiter on req/res to trigger cache invalidation webhook event
|
||||
parentApp.use(shared.middlewares.emitEvents);
|
||||
parentApp.use(mw.emitEvents);
|
||||
|
||||
// enabled gzip compression by default
|
||||
if (config.get('compress') !== false) {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
module.exports = {
|
||||
emitEvents: require('./emit-events'),
|
||||
logRequest: require('./log-request'),
|
||||
requestId: require('./request-id')
|
||||
};
|
||||
|
|
|
@ -57,9 +57,5 @@ module.exports = {
|
|||
|
||||
get updateUserLastSeen() {
|
||||
return require('./update-user-last-seen');
|
||||
},
|
||||
|
||||
get emitEvents() {
|
||||
return require('./emit-events');
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue