123456789101112131415161718192021222324252627282930 |
- function getSocketIntegration(integrationType) {
- let resolvedSocketIntegration;
- switch (integrationType) {
- case 'wds': {
- resolvedSocketIntegration = require.resolve('../../sockets/WDSSocket');
- break;
- }
- case 'whm': {
- resolvedSocketIntegration = require.resolve('../../sockets/WHMEventSource');
- break;
- }
- case 'wps': {
- resolvedSocketIntegration = require.resolve('../../sockets/WPSSocket');
- break;
- }
- default: {
- resolvedSocketIntegration = require.resolve(integrationType);
- break;
- }
- }
- return resolvedSocketIntegration;
- }
- module.exports = getSocketIntegration;
|