mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 08:55:47 +01:00
typo
This commit is contained in:
@@ -19,14 +19,14 @@ HotSwap.find = function(id) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
HotSwap.replace = function(id, middleware) {
|
HotSwap.replace = function(id, router) {
|
||||||
var idx = HotSwap.find(id);
|
var idx = HotSwap.find(id);
|
||||||
if (idx) {
|
if (idx) {
|
||||||
delete stack[idx].handle; // Destroy the old middleware
|
delete stack[idx].handle; // Destroy the old router
|
||||||
stack[idx].handle = middleware; // Replace with the new one
|
stack[idx].handle = router; // Replace with the new one
|
||||||
winston.info('[hotswap] Middleware with id `' + id + '` replaced successfully');
|
winston.info('[hotswap] Router with id `' + id + '` replaced successfully');
|
||||||
} else {
|
} else {
|
||||||
winston.warn('[hotswap] Could not find middleware in stack with hotswapId `' + id + '`');
|
winston.warn('[hotswap] Could not find router in stack with hotswapId `' + id + '`');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user