check if there is not profile, to redir
This commit is contained in:
parent
bdaf40de48
commit
b03a3f1391
9 changed files with 52 additions and 28 deletions
|
|
@ -1,9 +1,18 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('HomeController', function($scope, $rootScope, $location, notification, controllerUtils, pluginManager) {
|
||||
|
||||
controllerUtils.redirIfLogged();
|
||||
|
||||
$scope.retreiving =true;
|
||||
copay.Identity.anyProfile({
|
||||
pluginManager: pluginManager,
|
||||
}, function(any) {
|
||||
$scope.retreiving =false;
|
||||
if (!any)
|
||||
$location.path('/createProfile');
|
||||
});
|
||||
|
||||
|
||||
$scope.openProfile = function(form) {
|
||||
if (form && form.$invalid) {
|
||||
notification.error('Error', 'Please enter the required fields');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue