<commit_before>'use strict';

var geoHashingApp = angular.module('GeoHashingApp',
            ['ngRoute', 'yaMap', 'textAngular', 'ui.router', 'angularFileUpload']);

geoHashingApp.config(function($stateProvider, $urlRouterProvider) {

    $urlRouterProvider.otherwise("/");
    //
    // Now set up the states
    $stateProvider
        .state('main_state', {
            url: "/",
            templateUrl: 'views/main.html',
            controller: 'MarkersListCtrl',
            data:{
                needAuth:  false
            }
        })
        .state('login_state', {
            url: "/login",
            templateUrl: 'views/login.html',
            controller: 'LoginCtrl',
            data:{
                needAuth:  false
            }
        })
        .state('edit_marker', {
            url: '/edit/marker/:id',
            templateUrl: 'views/edit_marker.html',
            controller: 'EditMarkerCtrl',
            data:{
                needAuth:  true
            }
        })
        .state('add_marker', {
            url: '/add/marker',
            templateUrl: 'views/edit_marker.html',
            controller: 'EditMarkerCtrl',
            data:{
                needAuth:  true
            }
        })
        .state('show_marker',{
            url: '/show/:id',
            templateUrl: 'views/single_marker_view.html',
            controller: 'SingleMarkerViewCtrl',
            data:{
                needAuth:  false
            }
        }).
        state('register_user', {
            url: "/registration",
            templateUrl: 'views/register_user.html',
            controller: 'RegisterUserCtrl',
            data:{
                needAuth:  false
            }
        });
});

geoHashingApp.config(function ($httpProvider) {

    var logsOutUserOn401 = ['$q', '$location', '$rootScope', function ($q, $location, rootScope) {
        var success = function (response) {
            return response;
        };

        var error = function (response) {
            if (response.status === 401) {
                //redirect them back to login page
                rootScope.$broadcast('event:loginRequired');
//                var deferred = $q.defer();
//                var req = {
//                    config: response.config,
//                    deferred: deferred
//                }
//                scope.$broadcast('event:loginRequired');
//                return deferred.promise;

<commit_msg>master Route to edit user contoller in angular app<commit_after>'use strict';

var geoHashingApp = angular.module('GeoHashingApp',
            ['ngRoute', 'yaMap', 'textAngular', 'ui.router', 'angularFileUpload']);

geoHashingApp.config(function($stateProvider, $urlRouterProvider) {

    $urlRouterProvider.otherwise("/");
    //
    // Now set up the states
    $stateProvider
        .state('main_state', {
            url: "/",
            templateUrl: 'views/main.html',
            controller: 'MarkersListCtrl',
            data:{
                needAuth:  false
            }
        })
        .state('login_state', {
            url: "/login",
            templateUrl: 'views/login.html',
            controller: 'LoginCtrl',
            data:{
                needAuth:  false
            }
        })
        .state('edit_marker', {
            url: '/edit/marker/:id',
            templateUrl: 'views/edit_marker.html',
            controller: 'EditMarkerCtrl',
            data:{
                needAuth:  true
            }
        })
        .state('add_marker', {
            url: '/add/marker',
            templateUrl: 'views/edit_marker.html',
            controller: 'EditMarkerCtrl',
            data:{
                needAuth:  true
            }
        })
        .state('show_marker',{
            url: '/show/:id',
            templateUrl: 'views/single_marker_view.html',
            controller: 'SingleMarkerViewCtrl',
            data:{
                needAuth:  false
            }
        })
        .state('register_user', {
            url: "/registration",
            templateUrl: 'views/register_user.html',
            controller: 'RegisterUserCtrl',
            data:{
                needAuth:  false
            }
        })
        .state('edit_user',{
            url: "/userinfo",
            templateUrl: 'views/edit_user.html',
            controller: 'EditUserCtrl',
            data:{
                needAuth:  true
            }
        });
});

geoHashingApp.config(function ($httpProvider) {

    var logsOutUserOn401 = ['$q', '$location', '$rootScope', function ($q, $location, rootScope) {
        var success = function (response) {
            return response;
        };

        var error = function (response) {
            if (response.status === 401) {
                //redirect them back to login page
                rootScope.$broadcast('event:loginRequired');
//                var deferred = $q.defer();
//                var req = {
//                    config: response.config,
//                    deferred: deferred
//                }
//                scope.$broadcast('event:loginRequired');
//                return deferred.promise;


{'fraction_non_alphanumeric': 0.12744150067685167, 'fraction_numerical': 0.002320634306710501, 'mean_word_length': 1.4078212290502794, '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': '1870698', 'n_tokens_mistral': 1365, 'n_tokens_neox': 1308, 'n_words': 260}