mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 19:51:08 -03:30
returning promise in resolve for setup menu
This commit is contained in:
@@ -18,12 +18,12 @@ export default {
|
|||||||
$rootScope.orgAdmin = true;
|
$rootScope.orgAdmin = true;
|
||||||
} else {
|
} else {
|
||||||
Rest.setUrl(`/api/v1/users/${$rootScope.current_user.id}/admin_of_organizations`);
|
Rest.setUrl(`/api/v1/users/${$rootScope.current_user.id}/admin_of_organizations`);
|
||||||
Rest.get()
|
return Rest.get().then(function(data){
|
||||||
.success(function(data) {
|
$rootScope.orgAdmin = (data.data.count) ? true : false;
|
||||||
$rootScope.orgAdmin = (data.count) ? true : false;
|
})
|
||||||
}).error(function (data, status) {
|
.catch(function (data, status) {
|
||||||
ProcessErrors($rootScope, data, status, null, { hdr: 'Error!', msg: 'Failed to find if users is admin of org' + status });
|
ProcessErrors($rootScope, data, status, null, { hdr: 'Error!', msg: 'Failed to find if users is admin of org' + status });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|||||||
Reference in New Issue
Block a user