--- a/cms/app-client/mirage/config.js Sun Oct 16 22:23:31 2016 +0530
+++ b/cms/app-client/mirage/config.js Sun Oct 16 23:19:57 2016 +0530
@@ -13,7 +13,7 @@
*/
// this.urlPrefix = ''; // make this `http://localhost:8080`, for example, if your API is on a different server
// this.namespace = ''; // make this `api`, for example, if your API is namespaced
- this.namespace = ENV.rootURL.replace(/\/$/,'')+'/api/v1';
+ this.namespace = (ENV.APP.backRootURL || ENV.rootURL).replace(/\/$/,'')+'/api/v1';
// this.timing = 400; // delay for each request, automatically set to 0 during testing
this.get('/documents', function({ documents }) {
@@ -21,12 +21,12 @@
});
this.get('/documents/:id', ({documents}, request) => {
- let id = decodeURIComponent(request.params.id);
+ let id = decodeURIComponent(decodeURIComponent(request.params.id));
return documents.find(id);
});
this.get('/documents/:id/transcript', ({transcripts}, request) => {
- let id = decodeURIComponent(request.params.id);
+ let id = decodeURIComponent(decodeURIComponent(request.params.id));
return transcripts.find(id).transcript;
});
@@ -44,7 +44,7 @@
var langIds = decodeURIComponent(request.params.ids);
var resMap = _.reduce(langIds.split(','), function(res, id) {
var fullId = id;
- if(!_.startsWith(fullId, constants.LEXVO_BASE_URL)) {
+ if(!_.startsWith(fullId, constants.LEXVO_BASE_URL) && !_.startsWith(fullId, constants.LANGUAGES_NODE_PREFIX)) {
fullId = constants.LEXVO_BASE_URL + id;
}
var lexvoRes = lexvos.find(fullId);