Skip to content

Commit

Permalink
fix coding convention style
Browse files Browse the repository at this point in the history
  • Loading branch information
dominhhai authored Dec 21, 2023
1 parent 29e91c0 commit 1d94a8f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
20 changes: 10 additions & 10 deletions src/event-sources/aws/sqs.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
const getRequestValuesFromSqs = ({ event }) => {
const method = "POST";
const headers = { host: "sqs.amazonaws.com" };
const body = event;
const method = 'POST'
const headers = { host: 'sqs.amazonaws.com' }
const body = event

return {
method,
headers,
body,

Check failure on line 9 in src/event-sources/aws/sqs.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Unexpected trailing comma
};
};
}
}

const getResponseToSqs = ({ statusCode, body }) => {
if (statusCode >= 400) {
throw new Error(body);
throw new Error(body)
}
return JSON.parse(body);
};

return JSON.parse(body)
}

module.exports = {
getRequest: getRequestValuesFromSqs,
getResponse: getResponseToSqs,

Check failure on line 23 in src/event-sources/aws/sqs.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Unexpected trailing comma
};
}
18 changes: 9 additions & 9 deletions src/event-sources/aws/step-functions.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
const getRequestValuesFromStepFunctions = ({ event }) => {
const method = "POST";
const headers = { host: "stepfunctions.amazonaws.com" };
const body = event;
const method = 'POST'
const headers = { host: 'stepfunctions.amazonaws.com' }
const body = event

return {
method,
headers,
body,

Check failure on line 9 in src/event-sources/aws/step-functions.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Unexpected trailing comma
};
};
}
}

function getResponseToStepFunctions({

Check failure on line 13 in src/event-sources/aws/step-functions.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Missing space before function parentheses
statusCode,
body,
isBase64Encoded = false,

Check failure on line 16 in src/event-sources/aws/step-functions.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Unexpected trailing comma
}) {
if (statusCode >= 400) {
throw new Error(body);
throw new Error(body)
}

if (isBase64Encoded) {
throw new Error("base64 encoding is not supported");
throw new Error('base64 encoding is not supported')
}

return JSON.parse(body);
return JSON.parse(body)
}

module.exports = {
getRequest: getRequestValuesFromStepFunctions,
getResponse: getResponseToStepFunctions,

Check failure on line 31 in src/event-sources/aws/step-functions.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Unexpected trailing comma
};
}

0 comments on commit 1d94a8f

Please sign in to comment.