From d692dd22603c2762c21c2e0bef8f72f7025fe41a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Oliva?= Date: Thu, 25 May 2023 21:39:39 -0600 Subject: Added blank spaces everywhere. --- src/main/java/com/encora/Main.java | 5 ++++- src/main/resources/application.yml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3