2020-05-09 15:07:42 +00:00
|
|
|
let angApp = require(__dirname+'/../init')
|
|
|
|
|
2020-05-11 18:26:51 +00:00
|
|
|
angApp.controller('LoginController', function($scope, ChimeVerseService, CredentialsServise) {
|
|
|
|
|
2020-05-09 15:07:42 +00:00
|
|
|
$scope.addAccountAndLoginAction = () => {
|
2020-05-11 18:26:51 +00:00
|
|
|
CredentialsServise.addCredentials($scope.credentials.bosh,
|
|
|
|
$scope.credentials.login,
|
|
|
|
$scope.credentials.password
|
2020-05-09 15:07:42 +00:00
|
|
|
)
|
2020-05-13 20:00:36 +00:00
|
|
|
ChimeVerseService.getCredentialsAndLogin()
|
2020-05-11 18:26:51 +00:00
|
|
|
$scope.accountForm.$setPristine()
|
|
|
|
$scope.accountForm.$setUntouched()
|
|
|
|
$scope.credentials = {}
|
2020-05-09 15:07:42 +00:00
|
|
|
}
|
2020-05-13 20:00:36 +00:00
|
|
|
})
|