make org related lists searchable on the correct base

This commit is contained in:
John Mitchell 2016-05-16 13:45:34 -04:00
parent 1bedc5dacc
commit 18e3552c86
2 changed files with 7 additions and 3 deletions

View File

@ -71,9 +71,9 @@ export default ['$compile', '$scope', '$stateParams', '$state', 'Rest', 'UserLis
var listMode = (mode === 'admins') ? 'users' : mode;
list = getList(mode);
list.listTitle = listTitle;
url = getUrl(mode, data);
list.listTitle = listTitle;
list.basePath = url;
$scope.orgRelatedUrls = data.related;

View File

@ -31,7 +31,11 @@ export default ['GetBasePath', function(GetBasePath) {
if (endPoint === 'inventories') {
endPoint = 'inventory';
}
return GetBasePath(endPoint);
if (endPoint.indexOf("/api/v1") > -1) {
return endPoint;
} else {
return GetBasePath(endPoint);
}
};
// inject the directive with the list and endpoint