|
@@ -77,7 +77,8 @@ function getDataByUrl( paramUrl, urlNamespaceParams = [] ) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- window.fetch(paramUrl, {
|
|
|
+ var jsonFormatParam = '&_task=loadDataAjax&currSortCol=ID&currSortFlip=desc';
|
|
|
+ window.fetch(paramUrl + jsonFormatParam, {
|
|
|
|
|
|
credentials: 'same-origin'
|
|
|
})
|
|
@@ -87,14 +88,14 @@ function getDataByUrl( paramUrl, urlNamespaceParams = [] ) {
|
|
|
.then(function(data) {
|
|
|
//todo: odebrane dane
|
|
|
//data.body.items
|
|
|
-
|
|
|
- if (data.body.item === null) {
|
|
|
+console.log(data);
|
|
|
+ if (data.rows === null) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- return data.body.items;
|
|
|
+ return data.rowsdata.rows;
|
|
|
|
|
|
- console.log('request succeeded with JSON getDataByNamespaceAndPK', data.body.items);
|
|
|
+ console.log('request succeeded with JSON getDataByNamespaceAndPK', data.rows);
|
|
|
}).catch(function(error) {
|
|
|
console.log('request failed', error)
|
|
|
});
|