ywana-core8 0.0.29 → 0.0.34

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.29",
3
+ "version": "0.0.34",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -369,30 +369,21 @@ const TableAPI = (url) => {
369
369
  all(filters) {
370
370
  let queryParams = "?"
371
371
  if (filters) {
372
-
373
- console.log('filters', filters)
374
-
375
372
  const filterQuery = Object.keys(filters).reduce((query, key) => {
376
-
377
373
  const value = filters[key]
378
-
379
374
  if (typeof (value) === 'boolean') {
380
375
  return query.concat(`${key}=${value}&`)
381
-
382
376
  } else if (Array.isArray(value)) {
383
- const param = value.length === 0 ? '' : value.reduce((param,item) => {
384
- param.concat(`${key}=${item}&`)
377
+ const param = value.length === 0 ? '' : value.reduce((param,item) => {
378
+ param = param.concat(`${key}=${item}&`)
385
379
  return param
386
380
  }, "")
387
381
  console.log(param)
388
382
  return query.concat(param)
389
-
390
383
  } else {
391
384
  return query.concat(`${key}=%${filters[key]}%&`)
392
385
  }
393
386
  }, "")
394
-
395
- console.log('filterQuery')
396
387
  queryParams = queryParams.concat(filterQuery)
397
388
  }
398
389
  return http.GET(url + queryParams)