Commit ec43b553 authored by Kyle Muldoon's avatar Kyle Muldoon

Removed commented out example code in the controller

parent e128e476
......@@ -52,64 +52,4 @@ public class StudentMarksController {
return ResponseEntity.ok("Successfully deleted student: " + sm.getEmailAddress());
}
//////////////////////////////////
// EX CODE FROM EMPLOYEE SERVICE
//////////////////////////////////
// // Return all employees
// // GET: http://localhost:8080/api/v1/employees/
// @GetMapping("/employees")
// public List<Employee> getAllEmployees() {
// return employeeService.findAllEmployees();
// }
//
// // Create a new employee
// // POST: http://localhost:8080/api/v1/employees/create
// // send this in postman: {"id": "4", "firstName": "Kyle", "lastName": "Muldoon"}
// @PostMapping("/employees/create")
// public Employee createEmployee(@RequestBody Employee employee) {
// return employeeService.addEmployee(employee);
// }
//
// // Get a particular employee
// // GET: http://localhost:8080/api/v1/employees/__num__
// @GetMapping("/employees/{id}")
// public ResponseEntity<Employee> getEmployeeById(@PathVariable(value = "id") Long employeeId) throws ResourceNotFoundException {
// Employee employee = employeeService.getEmployeeById(employeeId)
// .orElseThrow(() -> new ResourceNotFoundException("Employee by Id Not Found" + employeeId));
// return ResponseEntity.ok().body(employee);
// }
//
// // Update a particular employee
// @PutMapping("/employees/update/")
// public ResponseEntity<Employee> updateEmployeeById(@RequestBody Employee employeeNew) throws ResourceNotFoundException {
// Employee employee = employeeService.getEmployeeById(employeeNew.getId())
// .orElseThrow(() -> new ResourceNotFoundException("Employee by Id Not Found" + employeeNew.getId()));
//
// employee.setLastName(employeeNew.getLastName());
// employee.setFirstName(employeeNew.getFirstName());
//
// employeeService.updateEmployee(employee);
//
// return ResponseEntity.ok().body(employee);
// }
//
//
// // Delete a particular employee
// @DeleteMapping("/employees/remove/{id}")
// public ResponseEntity<Employee> deleteEmployeeById(@PathVariable(value = "id") Long employeeId) throws ResourceNotFoundException {
//
// Employee employee = employeeService.getEmployeeById(employeeId)
// .orElseThrow(() -> new ResourceNotFoundException("Employee by Id Not Found" + employeeId));
// employeeService.deleteEmployeeById(employee.getId());
//
// return ResponseEntity.ok().body(employee);
// }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment