<commit_before>'use strict';


app.controller('headerController', ['$route','LogoutService', function($route, LogoutService) {
    var vm = this;
    vm.logOut = LogoutService.logOut;
}]);

app.controller('FooterController', ['$route', function($route) {
    var vm = this;

}]);

app.controller('loginController', ['LoginService', function(LoginService) {
    var vm = this;
    vm.form = {};
    //submit form after validations have been cleared
    vm.login = function() {
        LoginService.login(vm.form);
    };
    vm.register = function() {
        LoginService.register();
    };
}]);

// app.controller('logoutController', ['LogoutService', function(LogoutService){
//   var vm = this;
//   vm.logOut = LogoutService.logOut;
// }]);

app.controller('signupController', ['SignUpService', function(SignUpService) {
    var vm = this;
    vm.form = {};
    vm.signup = function() {
        SignUpService.signup(vm.form);
    };
}]);

app.controller('donateController', ['$scope','$document','$location', '$window', 'LogoutService', 'DonateService', 'UserService', function($scope,$document,$location, $window, LogoutService, DonateService, UserService) {
    var vm = this;
    if (!$window.localStorage.token) {
        $location.path('/');
    }
    vm.currentUserId = UserService.ParseToken();
    vm.form = {};
    vm.form.amount = "20";
    vm.logOut = LogoutService.logOut;
    $scope.getToken = DonateService.getClientToken;


}]);


app.controller('userController', ['$location', '$window', 'UserService', 'LogoutService', '$http',"routeToApi", function($location, $window, UserService, LogoutService, $http, routeToApi) {
    var vm = this;

    //updateForm is filled with creamy goodness and then passed long with vm.submit to update user
    vm.updateForm = {};

    vm.updateForm.id = $window.localStorage.id;
    vm.updateForm.updated_at = Date.now();
    var currentUserId = $window.localStorage.id;
    vm.currentUserId = currentUserId;<commit_msg>added useful default donation amount to donate form<commit_after>'use strict';


app.controller('headerController', ['$route','LogoutService', function($route, LogoutService) {
    var vm = this;
    vm.logOut = LogoutService.logOut;
}]);

app.controller('FooterController', ['$route', function($route) {
    var vm = this;

}]);

app.controller('loginController', ['LoginService', function(LoginService) {
    var vm = this;
    vm.form = {};
    //submit form after validations have been cleared
    vm.login = function() {
        LoginService.login(vm.form);
    };
    vm.register = function() {
        LoginService.register();
    };
}]);

// app.controller('logoutController', ['LogoutService', function(LogoutService){
//   var vm = this;
//   vm.logOut = LogoutService.logOut;
// }]);

app.controller('signupController', ['SignUpService', function(SignUpService) {
    var vm = this;
    vm.form = {};
    vm.signup = function() {
        SignUpService.signup(vm.form);
    };
}]);

app.controller('donateController', ['$scope','$document','$location', '$window', 'LogoutService', 'DonateService', 'UserService', function($scope,$document,$location, $window, LogoutService, DonateService, UserService) {
    var vm = this;
    if (!$window.localStorage.token) {
        $location.path('/');
    }
    vm.currentUserId = UserService.ParseToken();
    vm.form = {};
    vm.form.amount = "100";
    vm.logOut = LogoutService.logOut;
    $scope.getToken = DonateService.getClientToken;


}]);


app.controller('userController', ['$location', '$window', 'UserService', 'LogoutService', '$http',"routeToApi", function($location, $window, UserService, LogoutService, $http, routeToApi) {
    var vm = this;

    //updateForm is filled with creamy goodness and then passed long with vm.submit to update user
    vm.updateForm = {};

    vm.updateForm.id = $window.localStorage.id;
    vm.updateForm.updated_at = Date.now();
    var currentUserId = $window.localStorage.id;
    vm.currentUserId = currentUserId;
{'fraction_non_alphanumeric': 0.16511919698870767, 'fraction_numerical': 0.0012547051442910915, 'mean_word_length': 3.9825, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '3931035', 'n_tokens_mistral': 1217, 'n_tokens_neox': 1208, 'n_words': 248}