<commit_before>angular
  .module('mage')
  .factory('Event', Event);

Event.$inject = ['$rootScope', '$resource', '$http', 'LocalStorageService'];

function Event($rootScope, $resource, $http, LocalStorageService) {
  var Event = $resource('/api/events/:id', {
    id: '@id'
  },{
    create: {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      }
    },
    update: {
      method: 'PUT',
      headers: {
        'Content-Type': 'application/json'
      }
    },
    query: {
      isArray: true,
      responseType: 'json',
      transformResponse: function(response) {
        if (response.form) {
          response.form.style = response.form.style || {
            fill: '#5278A2',
            stroke: '#5278A2',
            fillOpacity: 0.2,
            strokeOpacity: 1,
            strokeWidth: 2
          };
        }
        return response;
      }
    },
    count: {
      method: 'GET',
      url: '/api/events/count',
      headers: {
        'Content-Type': 'application/json'
      }
    },
    addTeam: {
      method: 'POST',
      url: '/api/events/:id/teams',
      headers: {
        'Content-Type': 'application/json'
      }
    },
    removeTeam: {
      method: 'DELETE',
      url: '/api/events/:id/teams/:teamId',
      headers: {
        'Content-Type': 'application/json'
      }
    },<commit_msg>set the form style on the actual forms<commit_after>angular
  .module('mage')
  .factory('Event', Event);

Event.$inject = ['$rootScope', '$resource', '$http', 'LocalStorageService'];

function Event($rootScope, $resource, $http, LocalStorageService) {
  var Event = $resource('/api/events/:id', {
    id: '@id'
  },{
    create: {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      }
    },
    update: {
      method: 'PUT',
      headers: {
        'Content-Type': 'application/json'
      }
    },
    query: {
      isArray: true,
      responseType: 'json',
      transformResponse: function(response) {
        if (response && response.length) {
          for (var i = 0; i < response.length; i++) {
            response[i].form.style = response[i].form.style || {
              fill: '#5278A2',
              stroke: '#5278A2',
              fillOpacity: 0.2,
              strokeOpacity: 1,
              strokeWidth: 2
            };
          }
        }
        return response;
      }
    },
    count: {
      method: 'GET',
      url: '/api/events/count',
      headers: {
        'Content-Type': 'application/json'
      }
    },
    addTeam: {
      method: 'POST',
      url: '/api/events/:id/teams',
      headers: {
        'Content-Type': 'application/json'
      }
    },
    removeTeam: {
      method: 'DELETE',
      url: '/api/events/:id/teams/:teamId',
      headers: {
        'Content-Type': 'application/json'
      }
    },
{'fraction_non_alphanumeric': 0.1640433718083246, 'fraction_numerical': 0.010143406785589367, 'mean_word_length': 1.79296875, 'pattern_counts': {'":': 0, '<': 4, '<?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': '1067669', 'n_tokens_mistral': 904, 'n_tokens_neox': 892, 'n_words': 171}