diff options
author | Adrián Oliva <adrian.oliva@cimat.mx> | 2023-05-25 21:39:39 -0600 |
---|---|---|
committer | Adrián Oliva <adrian.oliva@cimat.mx> | 2023-05-25 21:39:39 -0600 |
commit | d692dd22603c2762c21c2e0bef8f72f7025fe41a (patch) | |
tree | e928e379cb16bd0e85cab1ae50b33bb33496a602 /src | |
parent | ad37e97ef75cbe8f48a98d71874d4632dc157d59 (diff) | |
download | ToDo-App-BE-d692dd22603c2762c21c2e0bef8f72f7025fe41a.tar.gz ToDo-App-BE-d692dd22603c2762c21c2e0bef8f72f7025fe41a.zip |
Added blank spaces everywhere.
Diffstat (limited to '')
-rw-r--r-- | src/main/java/com/encora/Main.java | 5 | ||||
-rw-r--r-- | src/main/resources/application.yml | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/com/encora/Main.java b/src/main/java/com/encora/Main.java index a233550..47d72c0 100644 --- a/src/main/java/com/encora/Main.java +++ b/src/main/java/com/encora/Main.java @@ -27,6 +27,7 @@ public class Main { SpringApplication.run(Main.class, args); } + // Get all to dos. @GetMapping("/todos") @ResponseStatus(value=HttpStatus.OK) @@ -34,6 +35,7 @@ public class Main { return toDosRepository.findAll(); } + // Add a new to do. @ResponseStatus(value=HttpStatus.BAD_REQUEST, reason="Text is longer than 120 characters.") public static class longerThanMaxException extends RuntimeException {} @@ -57,6 +59,7 @@ public class Main { toDosRepository.save(todo); } + // Updates to do with new information @ResponseStatus(value=HttpStatus.BAD_REQUEST, reason="No to do with such index.") public static class toDoNotFound extends RuntimeException {} @@ -77,7 +80,6 @@ public class Main { // Update a to do with "done". - @PostMapping("/todos/{id}/done") @ResponseStatus(value=HttpStatus.OK) public void setDone(@PathVariable("id") Integer id) { @@ -90,6 +92,7 @@ public class Main { toDosRepository.save(selectedToDo); } + // Update a to do to set "done" as false. @PutMapping("/todos/{id}/undone") @ResponseStatus(value=HttpStatus.OK) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index afef73d..f9e9468 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,2 +1,2 @@ server: - port: 9090
\ No newline at end of file + port: 9090 |