@availity/api-axios
Advanced tools
Comparing version 9.0.5 to 9.0.6
@@ -5,2 +5,11 @@ # Changelog | ||
## [9.0.6](https://github.com/Availity/sdk-js/compare/@availity/api-axios@9.0.5...@availity/api-axios@9.0.6) (2024-12-16) | ||
### Bug Fixes | ||
* **api-axios:** all logic for limit ([e7e83fb](https://github.com/Availity/sdk-js/commit/e7e83fbf699fed973b3d04ef77d8775a5565fc21)) | ||
## [9.0.5](https://github.com/Availity/sdk-js/compare/@availity/api-axios@9.0.4...@availity/api-axios@9.0.5) (2024-12-13) | ||
@@ -7,0 +16,0 @@ |
@@ -439,9 +439,7 @@ "use strict"; | ||
return __async(this, null, function* () { | ||
var _a; | ||
const response = yield this.query(config); | ||
const key = this.getQueryResultKey(response.data); | ||
const length = (_a = response.data) == null ? void 0 : _a.length; | ||
const limit = response.data.limit || length <= response.data.totalCount ? Math.min(length, response.data.totalCount) || 1 : 1; | ||
const result = response.data[key] || []; | ||
const limit = response.data.limit || result.length <= response.data.totalCount ? Math.min(result.length, response.data.totalCount) || 1 : 1; | ||
const totalPages = Math.ceil(response.data.totalCount / limit); | ||
const result = response.data[key] || []; | ||
if (totalPages > 1) { | ||
@@ -448,0 +446,0 @@ const otherPages = []; |
{ | ||
"name": "@availity/api-axios", | ||
"version": "9.0.5", | ||
"version": "9.0.6", | ||
"description": "Wrappers for axios designed to work with the Availity portal", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -290,6 +290,5 @@ import qs from 'qs'; | ||
const key = this.getQueryResultKey(response.data); | ||
const length = response.data?.length; | ||
const limit = response.data.limit || length <= response.data.totalCount ? Math.min(length, response.data.totalCount) || 1 : 1; | ||
const result = response.data[key] || []; | ||
const limit = response.data.limit || result.length <= response.data.totalCount ? Math.min(result.length, response.data.totalCount) || 1 : 1; | ||
const totalPages = Math.ceil(response.data.totalCount / limit); | ||
const result = response.data[key] || []; | ||
@@ -296,0 +295,0 @@ if (totalPages > 1) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
201006
4314