equal
deleted
inserted
replaced
7 theme: 'stats/themes' |
7 theme: 'stats/themes' |
8 }; |
8 }; |
9 |
9 |
10 export default RESTAdapter.extend({ |
10 export default RESTAdapter.extend({ |
11 |
11 |
12 namespace: ENV.rootURL.replace(/\/$/,"")+'/api/v1', |
12 namespace: (ENV.APP.backRootURL || ENV.rootURL).replace(/\/$/,"")+'/api/v1', |
13 |
13 |
14 buildURL: function(modelName, id) { |
14 buildURL: function(modelName, id) { |
15 if(modelName === 'transcript') { |
15 if(modelName === 'transcript') { |
16 return this.urlPrefix() + '/documents/' + id + '/' + modelName; |
16 return this.urlPrefix() + '/documents/' + encodeURIComponent(encodeURIComponent(id)) + '/' + modelName; |
|
17 } else if (modelName === 'document' && id) { |
|
18 return this.urlPrefix() + '/documents/' + encodeURIComponent(encodeURIComponent(id)) ; |
17 } |
19 } |
18 return this._super(...arguments); |
20 return this._super(...arguments); |
19 }, |
21 }, |
20 |
22 |
21 pathForType: function(modelName) { |
23 pathForType: function(modelName) { |