--- a/cms/app-client/app/adapters/application.js Mon Oct 03 16:32:41 2016 +0200
+++ b/cms/app-client/app/adapters/application.js Tue Oct 04 11:58:39 2016 +0200
@@ -9,11 +9,13 @@
export default RESTAdapter.extend({
- namespace: ENV.backRootURL.replace(/\/$/,"")+'/api/v1',
+ namespace: (ENV.APP.backRootURL || ENV.rootURL).replace(/\/$/,"")+'/api/v1',
buildURL: function(modelName, id) {
if(modelName === 'transcript') {
- return this.urlPrefix() + '/documents/' + id + '/' + modelName;
+ return this.urlPrefix() + '/documents/' + encodeURIComponent(encodeURIComponent(id)) + '/' + modelName;
+ } else if (modelName === 'document' && id) {
+ return this.urlPrefix() + '/documents/' + encodeURIComponent(encodeURIComponent(id)) ;
}
return this._super(...arguments);
},