mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
SocketIORouter: Add ability to unregister handler
This will make it easier to add tests.
This commit is contained in:
parent
2e93fca699
commit
94f71bd5e9
1 changed files with 3 additions and 1 deletions
|
@ -39,11 +39,13 @@ let io;
|
|||
* adds a component
|
||||
*/
|
||||
exports.addComponent = (moduleName, module) => {
|
||||
// save the component
|
||||
if (module == null) return exports.deleteComponent(moduleName);
|
||||
components[moduleName] = module;
|
||||
module.setSocketIO(io);
|
||||
};
|
||||
|
||||
exports.deleteComponent = (moduleName) => { delete components[moduleName]; };
|
||||
|
||||
/**
|
||||
* sets the socket.io and adds event functions for routing
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue