From 071caea09665a3cb9f6027253b1628f1f7743722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Oliva?= Date: Thu, 25 May 2023 17:37:15 -0600 Subject: Added new comments and reformatted an empty function. --- src/main/java/com/encora/Main.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/com/encora') 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 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, -- cgit v1.2.3