<commit_before>angular.module('editTasting', []).controller('EditTastingController', ['$scope', '$routeParams', '$http',
    function ($scope, $routeParams, $http) {
        //TODO for some reason 200 ok is always received even if we call /plaa/plaa
        $scope.tasting = {}
        $http.get('/api/beers').
            success(function(data) {
                $scope.beers = _.pluck(data.beers, 'name')
            }).
            error(function(data, status, headers, config) {
                console.log('ERROR', status)
            });
        $scope.tastingId = $routeParams.tastingId
        $scope.onType = function(x) { console.log('onType', x) }
        $scope.save = save
        function save(tasting) {
            $http.post('/api/tastings', tasting).
                success(function(data, status, headers, config) {
                    console.log('successful post')<commit_msg>Add navigation when submitted<commit_after>angular.module('editTasting', []).controller('EditTastingController', ['$scope', '$routeParams', '$http', '$location',
    function ($scope, $routeParams, $http, $location) {
        //TODO for some reason 200 ok is always received even if we call /plaa/plaa
        $scope.tasting = {}
        $http.get('/api/beers').
            success(function(data) {
                $scope.beers = _.pluck(data.beers, 'name')
            }).
            error(function(data, status, headers, config) {
                console.log('ERROR', status)
            });
        $scope.tastingId = $routeParams.tastingId
        $scope.onType = function(x) { console.log('onType', x) }
        $scope.save = save
        function save(tasting) {
            $http.post('/api/tastings', tasting).
                success(function(data, status, headers, config) {
                    console.log('successful post')
                    $location.path('/tastings')
{'fraction_non_alphanumeric': 0.14930924548352817, 'fraction_numerical': 0.003188097768331562, 'mean_word_length': 2.186125211505922, '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': '481993', 'n_tokens_mistral': 536, 'n_tokens_neox': 517, 'n_words': 111}