<commit_before>angular.module('starter.services', [])

.service('Profile', function() {
  var user = {}

  var setUser = function(name, email, token, gender, photoURL, userId, profileLink) {
    user.name = name,
    user.email = email,
    user.token = token,
    user.gender = gender,
    user.photo = photoURL,
    user.id = userId,
    user.facebook_profile = profileLink
  }

  var getUser = function() {
    return user;
  }

  return {
    setUser: setUser,
    getUser: getUser
  }
})

.factory('RideAPI', function($resource) {
  return $resource("http://localhost:3000/api/users/1/rides/:rideID", null , {
    update: {
      method: 'PUT'
    }
  });
})

.factory('UserAPI', function($resource) {
  return $resource("http://localhost:3000/api/users/:userID");
})

.factory('VehicleAPI', function($resource) {
  return $resource('http://localhost:3000/api/users/1/vehicles/:vehicleID', null, {
    update: {
      method: 'PUT'
    }
  });
})

.factory('RegisterRide', function(RideAPI, VehicleAPI, $q, $rootScope){

  var service = {};

  service.register = function(ride, vehicle) {
    return $q(function(success, failure){<commit_msg>sets the endpoint to digital ocean server<commit_after>angular.module('starter.services', [])

.service('Profile', function() {
  var user = {}

  var setUser = function(name, email, token, gender, photoURL, userId, profileLink) {
    user.name = name,
    user.email = email,
    user.token = token,
    user.gender = gender,
    user.photo = photoURL,
    user.id = userId,
    user.facebook_profile = profileLink
  }

  var getUser = function() {
    return user;
  }

  return {
    setUser: setUser,
    getUser: getUser
  }
})

.factory('RideAPI', function($resource) {
  return $resource("http://192.168.127.12/api/users/1/rides/:rideID", null , {
    update: {
      method: 'PUT'
    }
  });
})

.factory('UserAPI', function($resource) {
  return $resource("http://192.168.127.12/api/users/:userID");
})

.factory('VehicleAPI', function($resource) {
  return $resource('http://192.168.127.12/api/users/1/vehicles/:vehicleID', null, {
    update: {
      method: 'PUT'
    }
  });
})

.factory('RegisterRide', function(RideAPI, VehicleAPI, $q, $rootScope){

  var service = {};

  service.register = function(ride, vehicle) {
    return $q(function(success, failure){
{'fraction_non_alphanumeric': 0.17054263565891473, 'fraction_numerical': 0.021102497846683894, 'mean_word_length': 3.450191570881226, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, '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': '6094408', 'n_tokens_mistral': 811, 'n_tokens_neox': 778, 'n_words': 147}