Skip to content

Commit

Permalink
small refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
atruskie committed Dec 3, 2012
1 parent 8c84b62 commit b6153fd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
21 changes: 0 additions & 21 deletions app/assets/javascripts/angular/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,3 @@ angular.module('angular-auth', ['http-auth-interceptor', 'content-mocks'])



function LoginCtrl($scope, $http, authService, PersonaAuthenticator) {


$scope.submit = function (provider) {

switch (provider) {
case "persona":
PersonaAuthenticator.login();
break;
default:
throw "Provider not matched";
}

console.info(result);

//$http.post(path).success(function () {
// authService.loginConfirmed();
//});
}
}
LoginCtrl.$inject = ['$scope', '$http', 'authService', 'PersonaAuthenticator'];
21 changes: 21 additions & 0 deletions app/assets/javascripts/angular/controllers/login.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
function LoginCtrl($scope, $http, authService, PersonaAuthenticator) {


$scope.submit = function (provider) {

switch (provider) {
case "persona":
PersonaAuthenticator.login();
break;
default:
throw "Provider not matched";
}

// console.info(result);

//$http.post(path).success(function () {
// authService.loginConfirmed();
//});
}
}
LoginCtrl.$inject = ['$scope', '$http', 'authService', 'PersonaAuthenticator'];
2 changes: 1 addition & 1 deletion lib/assets/javascripts/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function fluidIf(test, truthyAction, falseyAction){
}

return this;
};
}


/**
Expand Down

0 comments on commit b6153fd

Please sign in to comment.