about summary refs log tree commit diff
path: root/streaming
diff options
context:
space:
mode:
authorabcang <abcang1015@gmail.com>2020-11-24 01:35:14 +0900
committerGitHub <noreply@github.com>2020-11-23 17:35:14 +0100
commita2da02626ef7a026dc7f6ec4219fbb839f4c2721 (patch)
treec8283ec94f7e37cbd5fd8af9576375af5493b0c9 /streaming
parent4ae22c4613afe1c7e17eedb18f115ebbae7bbe0d (diff)
Fixed ESLint error (#15214)
* eslint --fix

* fix consistent-return

* fix promise/catch-or-return

* ignore import rule
Diffstat (limited to 'streaming')
-rw-r--r--streaming/index.js23
1 files changed, 13 insertions, 10 deletions
diff --git a/streaming/index.js b/streaming/index.js
index 877f45d19..3279bd94e 100644
--- a/streaming/index.js
+++ b/streaming/index.js
@@ -230,13 +230,13 @@ const startWorker = (workerId) => {
   const FALSE_VALUES = [
     false,
     0,
-    "0",
-    "f",
-    "F",
-    "false",
-    "FALSE",
-    "off",
-    "OFF"
+    '0',
+    'f',
+    'F',
+    'false',
+    'FALSE',
+    'off',
+    'OFF',
   ];
 
   /**
@@ -377,6 +377,8 @@ const startWorker = (workerId) => {
       return 'direct';
     case '/api/v1/streaming/list':
       return 'list';
+    default:
+      return undefined;
     }
   };
 
@@ -475,7 +477,7 @@ const startWorker = (workerId) => {
         log.verbose(req.requestId, `Closing connection for ${req.accountId} due to expired access token`);
         eventHandlers.onKill();
       }
-    }
+    };
   };
 
   /**
@@ -530,7 +532,8 @@ const startWorker = (workerId) => {
     log.error(req.requestId, err.toString());
 
     if (res.headersSent) {
-      return next(err);
+      next(err);
+      return;
     }
 
     res.writeHead(err.status || 500, { 'Content-Type': 'application/json' });
@@ -1032,7 +1035,7 @@ const startWorker = (workerId) => {
       if (type === 'subscribe') {
         subscribeWebsocketToChannel(session, firstParam(stream), params);
       } else if (type === 'unsubscribe') {
-        unsubscribeWebsocketFromChannel(session, firstParam(stream), params)
+        unsubscribeWebsocketFromChannel(session, firstParam(stream), params);
       } else {
         // Unknown action type
       }