Skip to content

Commit bfe94cc

Browse files
committed
Fix question mark in search url
1 parent f97e956 commit bfe94cc

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

app/document-management/js/collections/search_document.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,17 @@ define([
1414
return this;
1515
},
1616

17+
baseUrl: function(){
18+
return App.config.apiEndPoint + '/workspaces/' + encodeURIComponent(App.config.workspaceId) + '/documents/search';
19+
},
20+
1721
url: function () {
18-
return App.config.apiEndPoint + '/workspaces/' + encodeURIComponent(App.config.workspaceId) + '/documents/search?' + this.query;
22+
return this.query.startsWith('?') ? this.baseUrl() + this.query : this.baseUrl() + '?' + this.query;
1923
}
2024
});
2125

2226
return SearchDocumentList;
2327
});
28+
29+
30+

app/js/common-objects/collections/part_search_collection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ define([
2727
},
2828

2929
url: function () {
30-
return this.urlBase + '?' + this.query;
30+
return this.query.startsWith('?') ? this.urlBase + this.query : this.urlBase + '?' + this.query;
3131
}
3232

3333
});

0 commit comments

Comments
 (0)