aws-v3-sdk 1.0.11 → 1.0.12

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.
@@ -33,12 +33,16 @@ const getClient = async () => {
33
33
  exports.sendGetRequest = async (index, query, from, size, sort, _source) => {
34
34
  const client = await getClient()
35
35
  return new Promise((resolve, reject) => {
36
+ let body = { query }
37
+ if (sort) {
38
+ body = { query, sort }
39
+ }
36
40
  client.search({
37
41
  index,
38
42
  from,
39
43
  size,
40
44
  _source,
41
- body: { query, sort }
45
+ body
42
46
  }).then(response => {
43
47
  const data = response.body.hits.hits
44
48
  const totalCount = response.body.hits.total
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aws-v3-sdk",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "AWS v3 SDK Utils",
5
5
  "main": "index.js",
6
6
  "scripts": {