--- a/cms/app-client/app/adapters/application.js Sun Oct 16 22:23:31 2016 +0530
+++ b/cms/app-client/app/adapters/application.js Sun Oct 16 23:19:57 2016 +0530
@@ -9,11 +9,13 @@
export default RESTAdapter.extend({
- namespace: ENV.rootURL.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);
},