This commit is contained in:
Daniel
2024-11-03 22:36:53 +02:00
parent cabf8283f8
commit 69b7a3596c
3 changed files with 262 additions and 42 deletions

View File

@@ -32,6 +32,11 @@ public class Main {
res.sendResponse(HttpStatus.OK, "All good, lil bro");
});
server.GET("/user", (req, res) -> {
Product product = productDao.getProductById(5);
res.sendJson(HttpStatus.OK, product);
});
server.GET("/products", (req, res) -> {
Product product = productDao.getProductById(5);
res.sendResponse(HttpStatus.OK, product.toString());