Minor fix

This commit is contained in:
2025-12-07 20:40:33 +01:00
parent ff34340bdc
commit 28f3710d73

View File

@@ -3,6 +3,7 @@ package httpServer.httpServer.src.handlers;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.sun.net.httpserver.HttpExchange;
import common.common.src.html.HtmlManager;
import common.common.src.json.JsonManager;
import common.common.src.logger.Logger;
import httpServer.httpServer.src.annotations.AllowedVerb;
import httpServer.httpServer.src.annotations.OnlyAuthorizedClients;
@@ -44,8 +45,7 @@ public class RequestHandler implements IRequestHandler {
.lines()
.reduce("", (acc, line) -> acc + line + "\n");
ObjectMapper mapper = new ObjectMapper();
Client client = mapper.readValue(body, Client.class);
Client client = JsonManager.deserialize(body, Client.class);
System.out.println("Received POST data:\n" + body);