{"size": 744, "ext": "js", "max_stars_repo_path": "public/scripts/app/services/alumnoService.js", "max_stars_repo_name": "federicor1212/tesisasistencia", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "public/scripts/app/services/alumnoService.js", "max_issues_repo_name": "federicor1212/tesisasistencia", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "public/scripts/app/services/alumnoService.js", "max_forks_repo_name": "federicor1212/tesisasistencia", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.5789473684, "max_line_length": 94, "alphanum_fraction": 0.622311828}
angular
.module('app')
.factory('alumnoService', [
  '$log',
  '$http',
  '$auth',
  alumnoService,
]);

function alumnoService($log, $http, $auth) {

  function getAlumnos() {
    return $http({ method: "GET", url: '/api/alumno', cache: false });
  }

  function guardarAlumno(alumno) {
    return $http({ method: "POST", url: '/api/crear-alumno', data: alumno});
  }

  function actualizarAlumno(alumno) {
    return $http({ method: "POST", url: '/api/actualizar-alumno/' + alumno.id, data: alumno});
  }

  function borrarAlumno(alumno) {
    return $http({ method: "POST", url: '/api/eliminar-alumno/' + alumno});
  }


  const service = {
    getAlumnos,
    guardarAlumno,
    actualizarAlumno,
    borrarAlumno
  };

  return service;
}
