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

  angular.module('hansei.ui')

  .controller('BoardsCtrl', ['$scope', 'boards', 'user', 'api', 'config',
    function($scope, boards, user, api, config) {

      if (!user.token()) return;

      $scope.boards  = boards;
      $scope.colsets = config.colsets();

      // reverse the array to order boards by descending create date
      $scope.boards.reverse();

      api.hook('board:create', $scope, function(board) {
        $scope.boards.push(board);
      });
    }])

})();<commit_msg>hook board:create more better<commit_after>(function() {
  'use strict';

  angular.module('hansei.ui')

  .controller('BoardsCtrl', ['$scope', 'boards', 'user', 'api', 'config', 'eventerFactory',
    function($scope, boards, user, api, config, eventerFactory) {

      // if (!user.token()) return;

      $scope.boards  = boards;
      $scope.colsets = config.colsets();

      // reverse the array to order boards by descending create date
      $scope.boards.reverse();

      eventerFactory().event('board:create', function(board) {
        $scope.boards.push(board);
      }).hook($scope);

    }])

})();
{'fraction_non_alphanumeric': 0.1836379460400348, 'fraction_numerical': 0.0, 'mean_word_length': 3.2279411764705883, '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': '1741069', 'n_tokens_mistral': 362, 'n_tokens_neox': 346, 'n_words': 79}