<commit_before>define(['./module'], function (services) {
    'use strict';

        
    services.factory('UserService', function($http, ipCookie) {
        return {
            logIn: function (email, password) {
                return $http.post('http://localhost:8090' + '/api/login', {email: email, password: password});
            },

            logOut: function() {
                return $http.get('http://localhost:8090' + '/api/logout');

            },

            register: function (username, surname, email, password) {
                console.log(username);
                console.log(surname);
                console.log(email);
                console.log(password);

                return $http.post('http://localhost:8090' + '/api/register', {first_name: username,last_name: surname, email: email, password: password});

            },

            isLoggedIn: function() {
                if(ipCookie('token')) {
                    return true;
                } else {
                    return false;
                }
            },

            isAdministrator: function() {
                if(ipCookie('role')=='administrator') {
                    return true;
                } else {
                    return false;
                }
            }
        }
    });


});




<commit_msg>change user-service<commit_after>define(['./module'], function (services) {
    'use strict';

        
    services.factory('UserService', function($http, ipCookie) {
        return {
            logIn: function (email, password) {
                return $http.post('http://ita-kv.tk:8090' + '/api/login', {email: email, password: password});
            },

            logOut: function() {
                return $http.get('http://ita-kv.tk:8090' + '/api/logout');

            },

            register: function (username, surname, email, password) {
                console.log(username);
                console.log(surname);
                console.log(email);
                console.log(password);

                return $http.post('http://ita-kv.tk:8090' + '/api/register', { first_name: username, last_name: surname, email: email, password: password });

            },

            isLoggedIn: function() {
                if(ipCookie('token')) {
                    return true;
                } else {
                    return false;
                }
            },

            isAdministrator: function() {
                if(ipCookie('role')=='administrator') {
                    return true;
                } else {
                    return false;
                }
            }
        }
    });


});





{'fraction_non_alphanumeric': 0.13481036425084492, 'fraction_numerical': 0.009012392039053699, 'mean_word_length': 1.3165217391304347, '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': '6703376', 'n_tokens_mistral': 724, 'n_tokens_neox': 642, 'n_words': 124}