redux-clerk2 2.0.23 → 2.0.25

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.
@@ -159,12 +159,13 @@ var Fetch = exports.Fetch = function (_BaseAction) {
159
159
 
160
160
  //apiparams = queryString.stringify(parameters);
161
161
  //const url = `${API_ROOT}/contacts/aarhotel`;
162
- if (options.url) {
163
- url = url + '/' + options.url;
164
- }
165
162
  //url = `${url}?${apiparams}`;
166
163
  }
167
164
 
165
+ if (options.url) {
166
+ url = url + '/' + options.url;
167
+ }
168
+
168
169
  return api.get(url, { params: apiparams }).then(function (response) {
169
170
  if (displayLoading) {
170
171
  dispatch(notifyDismiss(msguid));
@@ -172,6 +173,8 @@ var Fetch = exports.Fetch = function (_BaseAction) {
172
173
  //successHandler(response.data.data);
173
174
  if (response.headers['x-total-count'] !== undefined) {
174
175
  additionalData.total = Number.parseInt(response.headers['x-total-count'], 10);
176
+ } else if (response.data.summary && response.data.summary.total) {
177
+ additionalData.total = Number.parseInt(response.data.summary.total, 10);
175
178
  }
176
179
  if (response.data.summary) {
177
180
  additionalData.summary = response.data.summary;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redux-clerk2",
3
- "version": "2.0.23",
3
+ "version": "2.0.25",
4
4
  "description": "Redux Clerk handles the async CRUD in your Redux App.",
5
5
  "main": "lib/index.js",
6
6
  "files": [
package/src/.DS_Store CHANGED
Binary file
@@ -137,11 +137,12 @@ export class Fetch extends BaseAction {
137
137
 
138
138
  //apiparams = queryString.stringify(parameters);
139
139
  //const url = `${API_ROOT}/contacts/aarhotel`;
140
- if(options.url){
141
- url = `${url}/${options.url}`;
142
- }
143
140
  //url = `${url}?${apiparams}`;
144
141
  }
142
+
143
+ if(options.url){
144
+ url = `${url}/${options.url}`;
145
+ }
145
146
 
146
147
  return api.get(url, { params: apiparams })
147
148
  .then(response => {
@@ -151,6 +152,8 @@ export class Fetch extends BaseAction {
151
152
  //successHandler(response.data.data);
152
153
  if(response.headers['x-total-count'] !== undefined){
153
154
  additionalData.total = Number.parseInt(response.headers['x-total-count'], 10);
155
+ }else if(response.data.summary && response.data.summary.total){
156
+ additionalData.total = Number.parseInt(response.data.summary.total, 10);
154
157
  }
155
158
  if(response.data.summary){
156
159
  additionalData.summary = response.data.summary;