<commit_before>class HomeController {
  constructor($location) {

    //TODO: Delete function once GET /volunteers/ API is set up
    let makeVolunteer = function(id, firstName, lastName, languages) {
      return {
        id: id,
        firstName: firstName,
        lastName: lastName,
        languages: languages
      };
    };

    let getVolunteers = function() {
      //TODO: Replace with API call to GET /volunteers/
      return [
        makeVolunteer(0, 'Bill', 'Brown', ['German']),
        makeVolunteer(1, 'Ellie', 'White', ['Portuguese, Spanish']),
        makeVolunteer(2, 'Tom', 'Jones', ['Spanish', 'French'])
      ];
    };

    let getAllLanguages = function() {
      //TODO: Replace with API call
      return ['Spanish', 'German', 'French', 'Portuguese'];
    };

    this.updateOrder = function(ordering) {
      this.isReverseOrder = (this.ordering === ordering) ? !this.isReverseOrder : false;
      this.ordering = ordering;
    };

    this.allLanguages = getAllLanguages();
    this.ordering = 'lastName';
    this.isReverseOrder = false;
    this.volunteers = getVolunteers()
}

HomeController.$inject = ["$location"];

export default HomeController;<commit_msg>Updated the home controller to link to user page<commit_after>class HomeController {
  constructor($location) {

    //TODO: Delete function once GET /volunteers/ API is set up
    let makeVolunteer = function(id, firstName, lastName, languages) {
      return {
        id: id,
        firstName: firstName,
        lastName: lastName,
        languages: languages
      };
    };

    let getVolunteers = function() {
      //TODO: Replace with API call to GET /volunteers/
      return [
        makeVolunteer(0, 'Bill', 'Brown', ['German']),
        makeVolunteer(1, 'Ellie', 'White', ['Portuguese, Spanish']),
        makeVolunteer(3, 'Tom', 'Jones', ['Spanish', 'French'])
      ];
    };

    let getAllLanguages = function() {
      //TODO: Replace with API call
      return ['Spanish', 'German', 'French', 'Portuguese'];
    };

    let viewVolunteer = function(volunteerId) {
      $location.path('/volunteer/' + volunteerId.toString());
    }

    this.updateOrder = function(ordering) {
      this.isReverseOrder = (this.ordering === ordering) ? !this.isReverseOrder : false;
      this.ordering = ordering;
    };

    this.allLanguages = getAllLanguages();

    this.ordering = 'lastName';
    this.isReverseOrder = false;
    this.volunteers = getVolunteers();
    this.viewVolunteer = viewVolunteer;
  }
}

HomeController.$inject = ["$location"];

export default HomeController;
{'fraction_non_alphanumeric': 0.13618827160493827, 'fraction_numerical': 0.0023148148148148147, 'mean_word_length': 2.899248120300752, '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': '6338289', 'n_tokens_mistral': 822, 'n_tokens_neox': 766, 'n_words': 192}