Replaced all hard-coded api/v1 references with dynamic references or with v2

This commit is contained in:
Michael Abashian
2017-05-24 17:04:10 -04:00
parent aaf039c23d
commit b875fd65e1
36 changed files with 64 additions and 70 deletions

View File

@@ -61,7 +61,7 @@ export default ['$scope', '$rootScope',
if ($rootScope.current_user && $rootScope.current_user.is_superuser) {
$scope.canShareCredential = true;
} else {
Rest.setUrl(`/api/v1/users/${$rootScope.current_user.id}/admin_of_organizations`);
Rest.setUrl(GetBasePath('users') + `${$rootScope.current_user.id}/admin_of_organizations`);
Rest.get()
.success(function(data) {
$scope.canShareCredential = (data.count) ? true : false;

View File

@@ -431,7 +431,7 @@ export default ['i18n', function(i18n) {
dataTipWatch: 'permissionsTooltip',
awToolTipTabEnabledInEditMode: true,
dataPlacement: 'right',
basePath: 'api/v1/credentials/{{$stateParams.credential_id}}/access_list/',
basePath: 'api/v2/credentials/{{$stateParams.credential_id}}/access_list/',
search: {
order_by: 'username'
},

View File

@@ -55,7 +55,7 @@ export default ['$scope', '$rootScope', '$location',
if ($rootScope.current_user && $rootScope.current_user.is_superuser) {
$scope.canShareCredential = true;
} else {
Rest.setUrl(`/api/v1/users/${$rootScope.current_user.id}/admin_of_organizations`);
Rest.setUrl(GetBasePath('users') + `${$rootScope.current_user.id}/admin_of_organizations`);
Rest.get()
.success(function(data) {
$scope.canShareCredential = (data.count) ? true : false;