bot-functions 1.7.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +9 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -909,11 +909,18 @@ const sendDataClickHouse = async (params, dataJSON) => {
909
909
  return new Promise(async function (resolve, reject) {
910
910
  actualFunction = "sendDataClickHouse";
911
911
  try {
912
+ payload = {
913
+ params,
914
+ data: dataJSON
915
+ }
912
916
  const batchPromises = [];
913
917
  const stringData = JSON.stringify(dataJSON);
914
918
  const response = await axios({
915
- method: 'post', url: process.env.INSERT_CLICKHOUSE, data: {params, dataJSON: stringData },
916
- maxBodyLength: Infinity, headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }
919
+ method: 'post',
920
+ url: process.env.INSERT_CLICKHOUSE,
921
+ data: payload,
922
+ maxBodyLength: Infinity,
923
+ headers: { 'Accept': 'application/json', 'Content-Type': 'application/json'}
917
924
  });
918
925
  batchPromises.push(response.status);
919
926
  batchPromises.map(reg => log.info('Insert status', reg));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bot-functions",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "Bot functions",
5
5
  "main": "index.js",
6
6
  "scripts": {