<commit_before>(function () {
    'use strict';

    angular
        .module('xr.dailyOutcome')
        .controller('DailyOutcomeController', DailyOutcomeController);

    DailyOutcomeController.$inject = ['ParseService', 'FormService', '$location'];

    function DailyOutcomeController(ParseService, FormService, $location) {
        var vm = this;
        vm.save = save;

        function save() {
            FormService.setAllFieldsToDirty(vm.dailyOutcomeForm);

            if (FormService.allFieldsAreValid(vm.dailyOutcomeForm)) {
                var dailyOutcome = {
                    firstStory: vm.outcome1,
                    secondStory: vm.outcome2,
                    thirdStory: vm.outcome3,
                    date: {
                        '__type': 'Date',
                        'iso': new Date().toISOString()
                    }
                };

                ParseService.postObject('DailyOutcome', dailyOutcome)
                    .then(function () {
                        //$location.path('overview');
                    });
            }

        }<commit_msg>Fixed failing test<commit_after>(function () {
    'use strict';

    angular
        .module('xr.dailyOutcome')
        .controller('DailyOutcomeController', DailyOutcomeController);

    DailyOutcomeController.$inject = ['ParseService', 'FormService', '$location'];

    function DailyOutcomeController(ParseService, FormService, $location) {
        var vm = this;
        vm.save = save;

        function save() {
            FormService.setAllFieldsToDirty(vm.dailyOutcomeForm);

            if (FormService.allFieldsAreValid(vm.dailyOutcomeForm)) {
                var dailyOutcome = {
                    firstStory: vm.outcome1,
                    secondStory: vm.outcome2,
                    thirdStory: vm.outcome3,
                    date: {
                        '__type': 'Date',
                        'iso': new Date().toISOString()
                    }
                };

                ParseService.postObject('DailyOutcome', dailyOutcome)
                    .then(function () {
                        $location.path('overview');
                    });
            }

        }
{'fraction_non_alphanumeric': 0.10673903211216644, 'fraction_numerical': 0.0027137042062415195, 'mean_word_length': 1.4826038159371493, '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': '2266534', 'n_tokens_mistral': 582, 'n_tokens_neox': 522, 'n_words': 88}