diff --git a/Backend/src/main/java/idealab/api/controller/MailController.java b/Backend/src/main/java/idealab/api/controller/MailController.java index 6712d209..b4d61835 100644 --- a/Backend/src/main/java/idealab/api/controller/MailController.java +++ b/Backend/src/main/java/idealab/api/controller/MailController.java @@ -35,12 +35,12 @@ public ResponseEntity sendEmail(@RequestBody MailRequest mailRequest) { return new ResponseEntity<>(response, response.getHttpStatus()); } - @PostMapping("/info") /** * This updates the email and password associated with the application. * @param request * @return */ + @PostMapping("/info") public GenericResponse updateEmailInfo(@RequestBody UpdateEmailInfoRequest request) { String email = request.getEmail(); String pw = request.getPassword(); diff --git a/Backend/src/main/java/idealab/api/controller/PrintJobController.java b/Backend/src/main/java/idealab/api/controller/PrintJobController.java index dc75b0fe..2b4760cc 100644 --- a/Backend/src/main/java/idealab/api/controller/PrintJobController.java +++ b/Backend/src/main/java/idealab/api/controller/PrintJobController.java @@ -49,7 +49,7 @@ public ResponseEntity printJobGetAll(@RequestParam(required = false) String s // TODO W.E. : add query param or boolean to model to accept mass upload (ignore 5 file max) @PostMapping - public ResponseEntity printJobNew(@ModelAttribute PrintJobNewRequest model, Principal principal) { + public ResponseEntity printJobNew(@Valid @ModelAttribute PrintJobNewRequest model, Principal principal) { DataResponse response = printJobOperations.newPrintJob(model, principal); return new ResponseEntity<>(response, response.getHttpStatus()); @@ -109,7 +109,7 @@ public ResponseEntity getDeletablePrintJobs() { //Don't include the field in the JSON if you dont want it updated @PutMapping("/{print-id}") - public ResponseEntity updatePrintJobProperties(@PathVariable("print-id") Integer printId, @RequestBody UpdatePrintJobPropertiesRequest request, Principal principal) { + public ResponseEntity updatePrintJobProperties(@PathVariable("print-id") Integer printId, @RequestBody UpdatePrintJobPropertiesRequest request) { DataResponse response = printJobOperations.updatePrintJobProps(printId, request); return new ResponseEntity<>(response, response.getHttpStatus()); }