Commit 4d4f5d79 authored by Xiyang Lu's avatar Xiyang Lu

adding email address update functionality

parent 6ad14369
...@@ -29,6 +29,10 @@ public class StudentAddressController { ...@@ -29,6 +29,10 @@ public class StudentAddressController {
return studentAddressService.createStudentAddress(studentAddress); return studentAddressService.createStudentAddress(studentAddress);
} }
@PutMapping("/studentaddress/{email}")
public ResponseEntity<StudentAddress> updateStudentAddress(@PathVariable("email") String email, @RequestBody StudentAddress studentAddress )
throws ResourceNotFoundException{
StudentAddress updatedStudentAddress = studentAddressService.updateStudentAddress(studentAddress, email);
return ResponseEntity.ok(updatedStudentAddress);
}
} }
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