<commit_before>'use strict';

// Users service used for communicating with the users REST endpoint
angular.module('users').factory('Users', ['$resource',
  function ($resource) {
    return $resource('api/users', {}, {
      update: {
        method: 'PUT'
      }
    });
  }
]);

angular.module('users').factory('Profile', ['$resource',
  function ($resource) {
    return $resource('api/profile/:userId', {}, {
      userId: '@_id'
    });
  }
]);

//TODO this should be Users service
angular.module('users.admin').factory('Admin', ['$resource',
  function ($resource) {
    return $resource('api/users/:userId', {
      userId: '@_id'
    }, {
      update: {
        method: 'PUT'
      }
    });
  }
]);

angular.module('users').factory('UserApi', ['$http',
  function ($http) {
    this.get_polls = (userId, page) => {
      return $http.get('/api/profile/' + userId + 'polls/' + page);
    };
    this.get_cmts = (userId, page) => {
      return $http.get('/api/profile/' + userId + 'cmts/' + page);
    };
    this.get_likes = (userId, page) => {
      return $http.get('/api/profile/' + userId + 'likes/' + page);
    };
    this.get_dislikes = (userId, page) => {
      return $http.get('/api/profile/' + userId + 'dislikes/' + page);
    };
    this.get_bookmarks = (userId, page) => {
      return $http.get('/api/profile/' + userId + 'bookmarks/' + page);
    };
    this.get_follows = (userId, page) => {
      return $http.get('/api/profile/' + userId + 'follows/' + page);
    };
    this.get_votes = (userId, page) => {
      return $http.get('/api/profile/' + userId + 'votes/' + page);
    };
    return this;
  }
]);
<commit_msg>Commited from lenh at Tue, Jul 04, 2017  3:25:41 PM<commit_after>'use strict';

// Users service used for communicating with the users REST endpoint
angular.module('users').factory('Users', ['$resource',
  function ($resource) {
    return $resource('api/users', {}, {
      update: {
        method: 'PUT'
      }
    });
  }
]);

angular.module('users').factory('Profile', ['$resource',
  function ($resource) {
    return $resource('api/profile/:userId', {}, {
      userId: '@_id'
    });
  }
]);

//TODO this should be Users service
angular.module('users.admin').factory('Admin', ['$resource',
  function ($resource) {
    return $resource('api/users/:userId', {
      userId: '@_id'
    }, {
      update: {
        method: 'PUT'
      }
    });
  }
]);

angular.module('users').factory('UserApi', ['$http',
  function ($http) {
    this.get_polls = (userId, page) => {
      return $http.get('/api/profile/' + userId + '/polls/' + page);
    };
    this.get_cmts = (userId, page) => {
      return $http.get('/api/profile/' + userId + '/cmts/' + page);
    };
    this.get_likes = (userId, page) => {
      return $http.get('/api/profile/' + userId + '/likes/' + page);
    };
    this.get_dislikes = (userId, page) => {
      return $http.get('/api/profile/' + userId + '/dislikes/' + page);
    };
    this.get_bookmarks = (userId, page) => {
      return $http.get('/api/profile/' + userId + '/bookmarks/' + page);
    };
    this.get_follows = (userId, page) => {
      return $http.get('/api/profile/' + userId + '/follows/' + page);
    };
    this.get_votes = (userId, page) => {
      return $http.get('/api/profile/' + userId + '/votes/' + page);
    };
    return this;
  }
]);

{'fraction_non_alphanumeric': 0.21195814648729447, 'fraction_numerical': 0.003288490284005979, 'mean_word_length': 2.6769230769230767, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '411466', 'n_tokens_mistral': 1112, 'n_tokens_neox': 1138, 'n_words': 225}