Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<BasicPrintJob> response = printJobOperations.newPrintJob(model, principal);

return new ResponseEntity<>(response, response.getHttpStatus());
Expand Down Expand Up @@ -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<BasicPrintJob> response = printJobOperations.updatePrintJobProps(printId, request);
return new ResponseEntity<>(response, response.getHttpStatus());
}
Expand Down