<commit_before>angular.module('huntEdu.controllers')
    .controller('JobListingCtrl',['$scope', '$location', '$http', '$q', 'User', 'job', 
        function ($scope, $location, $http, $q, User, job){
            
            $scope.$on('$routeChangeError', function() {
                $location.path('/searchError');
            });

            $scope.$on('$routeChangeSuccess', function(){
                $scope.jobListingData = job;
                $scope.hasVideo = job.hasVideo();
                $scope.hasImage = job.hasImage();
            });

            $scope.hideSaveBookmarkBtn = User.isLoggedIn();

            /**
             * Save a job as a bookmark
             */

            $scope.saveBookmark = function (){
                var jobId = job.meta.id;
                var deferred = $q.defer();
                $http.post('/bookmark/add', { 'id' : jobId })
                    .then(function(){
                        deferred.resolve();
                    }, function(){
                        deferred.reject();
                    });
                console.log(User.getProfileData());
                return deferred.promise;
            };
    }]);<commit_msg>Removed debugging statement<commit_after>angular.module('huntEdu.controllers')
    .controller('JobListingCtrl',['$scope', '$location', '$http', '$q', 'User', 'job', 
        function ($scope, $location, $http, $q, User, job){
            
            $scope.$on('$routeChangeError', function() {
                $location.path('/searchError');
            });

            $scope.$on('$routeChangeSuccess', function(){
                $scope.jobListingData = job;
                $scope.hasVideo = job.hasVideo();
                $scope.hasImage = job.hasImage();
            });

            $scope.hideSaveBookmarkBtn = User.isLoggedIn();

            /**
             * Save a job as a bookmark
             */

            $scope.saveBookmark = function (){
                var jobId = job.meta.id;
                var deferred = $q.defer();
                $http.post('/bookmark/add', { 'id' : jobId })
                    .then(function(){
                        deferred.resolve();
                    }, function(){
                        deferred.reject();
                    });

                return deferred.promise;
            };
    }]);
{'fraction_non_alphanumeric': 0.15172120696982574, 'fraction_numerical': 0.0, 'mean_word_length': 1.3516483516483517, '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': '3625942', 'n_tokens_mistral': 629, 'n_tokens_neox': 585, 'n_words': 103}