aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
authorAdrián Oliva <adrian.oliva@cimat.mx>2023-05-25 17:37:15 -0600
committerAdrián Oliva <adrian.oliva@cimat.mx>2023-05-25 17:37:15 -0600
commit071caea09665a3cb9f6027253b1628f1f7743722 (patch)
tree437672052db5881e4a61175f63de8bae4d06b345 /src/main/java/com
parenta4dc3842ee6cdf1435f636e3a6dd3c91d579320b (diff)
downloadToDo-App-BE-071caea09665a3cb9f6027253b1628f1f7743722.tar.gz
ToDo-App-BE-071caea09665a3cb9f6027253b1628f1f7743722.zip
Added new comments and reformatted an empty function.
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/encora/Main.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/encora/Main.java b/src/main/java/com/encora/Main.java
index e9a0b24..6aa5281 100644
--- a/src/main/java/com/encora/Main.java
+++ b/src/main/java/com/encora/Main.java
@@ -25,16 +25,16 @@ public class Main {
SpringApplication.run(Main.class, args);
}
+ // Get all to dos.
@GetMapping("/todos")
@ResponseStatus(value=HttpStatus.OK)
public List<ToDos> getToDos() {
return toDosRepository.findAll();
}
- @ResponseStatus(value=HttpStatus.BAD_REQUEST, reason="Text is longer than 120 characters.") // 404
- public static class longerThanMaxException extends RuntimeException {
- // ...
- }
+ // Add a new to do.
+ @ResponseStatus(value=HttpStatus.BAD_REQUEST, reason="Text is longer than 120 characters.")
+ public static class longerThanMaxException extends RuntimeException {}
record NewToDo(
String text,
Date dueDate,