<commit_before>angular.module('app.controllers', [])

.controller('authCtrl', function($scope, $http, $location) {
    $scope.user = {fullName: '', userName: '', email: '', password: ''}

    // placeholder until auth is implemented
    $scope.login = function() { 
        $http.post('/login', {
            username: $scope.user.userName,
            password: $<PASSWORD>,
        })
        .success(function (user) {
            console.log('Received OK response from server.');
            $location.url('/gauntlet');
        })
        .error(function () {
            console.log('Received BAD response from server.');
            $location.url('/login');
        // $scope.error_message = 'login request for ' + $scope.user.username;
        });
    };

    // placeholder until auth is implemented
    $scope.register = function() {
        $http.post('/register', {
            name: $scope.user.fullName,
            username: $scope.user.userName,
            password: $<PASSWORD>, 
            email: $scope.user.email,
        })
        .success(function(user) {
            console.log('Registration successful.');
            $location.url('/gauntlet');
        })
        .error(function() {
            console.log('Registration failed.');
            $location.url('/login');
        // $scope.error_message = 'login request for ' + $scope.user.username;
        });
    };

    $scope.logout = function() {
        $http.post('/logout')
        .success(function() {<commit_msg>(refactor) fixes some syntax to match db schema<commit_after>angular.module('app.controllers', [])

.controller('authCtrl', function($scope, $http, $location) {
    $scope.user = {fullName: '', userName: '', email: '', password: ''}

    // placeholder until auth is implemented
    $scope.login = function() { 
        $http.post('/login', {
            userName: $scope.user.userName,
            password: $<PASSWORD>,
        })
        .success(function (user) {
            console.log('Received OK response from server.');
            $location.url('/gauntlet');
        })
        .error(function () {
            console.log('Received BAD response from server.');
            $location.url('/login');
        // $scope.error_message = 'login request for ' + $scope.user.username;
        });
    };

    // placeholder until auth is implemented
    $scope.register = function() {
        $http.post('/register', {
            fullName: $scope.user.fullName,
            userName: $scope.user.userName,
            password: $<PASSWORD>, 
            email: $scope.user.email,
        })
        .success(function(user) {
            console.log('Registration successful.');
            $location.url('/gauntlet');
        })
        .error(function() {
            console.log('Registration failed.');
            $location.url('/login');
        // $scope.error_message = 'login request for ' + $scope.user.username;
        });
    };

    $scope.logout = function() {
        $http.post('/logout')
        .success(function() {
{'fraction_non_alphanumeric': 0.1631578947368421, 'fraction_numerical': 0.0, 'mean_word_length': 1.9990138067061145, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5268369', 'n_tokens_mistral': 824, 'n_tokens_neox': 816, 'n_words': 157}