Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
Issue: PENDING
Reviewer: pending
  • Loading branch information
Randolf Tjandra committed Nov 9, 2023
1 parent 1294b4c commit dfa573b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/api/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,19 @@ function handleHTTP(globalArgs, req, res, next, callback, useBody) {

function handleListener(handler, method, endpoint, callback) {
switch (method) {
case "POST":
case 'POST':
handler.post(endpoint, callback);
break;
case "PUT":
case 'PUT':
handler.put(endpoint, callback);
break;
case "PATCH":
case 'PATCH':
handler.patch(endpoint, callback);
break;
case "DELETE":
case 'DELETE':
handler.delete(endpoint, callback);
break;
case "GET":
case 'GET':
default:
handler.get(endpoint, callback);
break;
Expand Down Expand Up @@ -117,7 +117,7 @@ function addHTTPListener(rio, endpoint, ignoreGlobals, callback, args, descripti
const globals = ignoreGlobals ? [] : rio.globalArgs;

handleListener(handler, method, endpoint, (req, res, next) => {
handleHTTP(globals, req, res, next, callback, ["POST", "PUT", "PATCH"].includes(method));
handleHTTP(globals, req, res, next, callback, ['POST', 'PUT', 'PATCH'].includes(method));
});
}

Expand Down

0 comments on commit dfa573b

Please sign in to comment.