<commit_before>'use strict';

angular.module('dockit')
  .controller('TodoCtrl', ['$location', '$log', '$routeParams', 'TodoService', 'ListService', function ($location, $log, $routeParams, TodoService, ListService) {

    var vm = this;
    vm.formData = {};
    vm.lists = [];
    vm.todos = [];
    var boardId = $routeParams.boardId;

    angular.extend(vm, {

      name: 'TodoCtrl',

    });

      vm.showTodos = function (listId) {
        console.log('made it to todo ctrl client side');
        TodoService.showTodos(listId)
        .then(function (foundTodos) {
          vm.todos = foundTodos;
        });
      }

      vm.create = function (listId) {
        vm.formData.listId = ListId;
        TodoService.createTodo(vm.formData)
        .then(function (foundTodos) {
          console.log('client side found todos after adding: ', foundTodos);
          vm.todos = foundTodos;
          vm.formData = {};
        });
      }

      vm.delete = function (data) {
        ListService.deleteList(data)
        .then(function (data) {
          vm.lists = data;
          // for (var i = 0; i < vm.lists.length; i++) {
          //   if (vm.lists[i]._id == data._id) {
          //     vm.lists.splice(i, 1);
          //     break;
            // }
          // }
        })
      }

  }]);<commit_msg>changed typos<commit_after>'use strict';

angular.module('dockit')
  .controller('TodoCtrl', ['$location', '$log', '$routeParams', 'TodoService', 'ListService', function ($location, $log, $routeParams, TodoService, ListService) {

    var vm = this;
    vm.formData = {};
    vm.lists = [];
    vm.todos = [];

    angular.extend(vm, {

      name: 'TodoCtrl',

    });

      vm.showTodos = function (listId) {
        console.log('made it to todo ctrl client side');
        TodoService.showTodos(listId)
        .then(function (foundTodos) {
          vm.todos = foundTodos;
        });
      }

      vm.create = function (listId) {
        vm.formData.listId = ListId;
        TodoService.createTodo(vm.formData)
        .then(function (foundTodos) {
          console.log('client side found todos after adding: ', foundTodos);
          vm.todos = foundTodos;
          vm.formData = {};
        });
      }

      vm.delete = function (data) {
        TodoService.deleteTodo(data)
        .then(function (data) {
          vm.todos = data;
          // for (var i = 0; i < vm.lists.length; i++) {
          //   if (vm.lists[i]._id == data._id) {
          //     vm.lists.splice(i, 1);
          //     break;
            // }
          // }
        })
      }

  }]);
{'fraction_non_alphanumeric': 0.1574074074074074, 'fraction_numerical': 0.0015432098765432098, 'mean_word_length': 1.8154180238870792, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7642176', 'n_tokens_mistral': 868, 'n_tokens_neox': 845, 'n_words': 160}