Skip to content

Commit

Permalink
fix: sonarcloud code analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
manish339k committed Dec 13, 2024
1 parent fe97f9e commit bb2e510
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/v1/destinations/reddit/networkHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const { TransformerProxyError } = require('../../../v0/util/errorTypes');

const populateResponseWithDontBatch = (rudderJobMetadata, response) => {
const errorMessage = JSON.stringify(response);
return rudderJobMetadata.map(metadata => {
return rudderJobMetadata.map((metadata) => {
// eslint-disable-next-line no-param-reassign
metadata.dontBatch = true;
return {
Expand Down Expand Up @@ -98,13 +98,10 @@ const responseHandler = (responseParams) => {
response: responseWithIndividualEvents,
};
};
// eslint-disable-next-line @typescript-eslint/naming-convention
class networkHandler {
constructor() {
this.responseHandler = responseHandler;
this.proxy = proxyRequest;
this.prepareProxy = prepareProxyRequest;
this.processAxiosResponse = processAxiosResponse;
}
function networkHandler() {
this.proxy = proxyRequest;
this.processAxiosResponse = processAxiosResponse;
this.prepareProxy = prepareProxyRequest;
this.responseHandler = responseHandler;
}
module.exports = { networkHandler };

0 comments on commit bb2e510

Please sign in to comment.