Skip to content

Commit

Permalink
GetDKAN/dkan#2994 Fix how the sort parameter is built (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
managume authored Feb 10, 2020
1 parent 6db1ab7 commit f7c0cdc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend.ckan_get.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ this.recline.Backend.Ckan = this.recline.Backend.Ckan || {};
for (var p in obj) {
if (obj.hasOwnProperty(p)) {
if (typeof obj[p] !== 'object') {
str += '&' + p + '=' + obj[p] ;
if(p == 'sort'){
str += '&' + p + '[' + obj[p].split(' ')[0] + ']' + '=' + obj[p].split(' ')[1] ;
}else{
str += '&' + p + '=' + obj[p] ;
}
}
}
}
Expand Down

0 comments on commit f7c0cdc

Please sign in to comment.