<commit_before>'use strict';
angular.module('myApp.register', ['ngRoute', 'firebase']).config(['$routeProvider', function($routeProvider) {
    $routeProvider.when('/register', {
        templateUrl: 'templates/register.html',
        controller: 'RegisterCtrl'
    });
}]).controller('RegisterCtrl', ['$scope', '$location', '$firebaseAuth','$http', function($scope, $location, $firebaseAuth,$http) {
    var firebaseObj = new Firebase("https://radiant-torch-5333.firebaseio.com");
    var auth = $firebaseAuth(firebaseObj);
    var login = {};
    $scope.login = login;
    $scope.signUp = function() {
        if (!$scope.regForm.$invalid) {
            var email = $scope.user.email;
            var password = $<PASSWORD>;
            if (email && password) {
                login.loading = true;
                auth.$createUser(email, password).then(function() {
                    swal("Yay!", "User creation successful", "success");
                    $location.path('/home');
                }, function(error) {
                    console.log(error);
                    $scope.regError = true;
                    $scope.regErrorMessage = error.message;
                    login.loading = false;
                    swal("Oops!", "Check your credentials", "error");
                });
            }
            $http.post('/api/registeruser/', $scope.user.email
             ).success(function(data, status, headers, config) {
              alert("Success!")
             }).error(function(data, status, headers, config) {
               alert("Error");
            });
        }
    };
}]);<commit_msg>changes removed<commit_after>'use strict';
angular.module('myApp.register', ['ngRoute', 'firebase']).config(['$routeProvider', function($routeProvider) {
    $routeProvider.when('/register', {
        templateUrl: 'templates/register.html',
        controller: 'RegisterCtrl'
    });
}]).controller('RegisterCtrl', ['$scope', '$location', '$firebaseAuth', function($scope, $location, $firebaseAuth) {
    var firebaseObj = new Firebase("https://radiant-torch-5333.firebaseio.com");
    var auth = $firebaseAuth(firebaseObj);
    var login = {};
    $scope.login = login;
    $scope.signUp = function() {
        if (!$scope.regForm.$invalid) {
            var email = $scope.user.email;
            var password = $<PASSWORD>;
            if (email && password) {
                login.loading = true;
                auth.$createUser(email, password).then(function() {
                    swal("Yay!", "User creation successful", "success");
                    $location.path('/home');
                }, function(error) {
                    console.log(error);
                    $scope.regError = true;
                    $scope.regErrorMessage = error.message;
                    login.loading = false;
                    swal("Oops!", "Check your credentials", "error");
                });
            }
        }
    };
}]);
{'fraction_non_alphanumeric': 0.1602975989178221, 'fraction_numerical': 0.002705444707473791, 'mean_word_length': 2.0183673469387755, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6587796', 'n_tokens_mistral': 796, 'n_tokens_neox': 771, 'n_words': 143}