implemented user logout

This commit is contained in:
2024-07-22 11:35:37 +02:00
parent 3c4116453b
commit 59b9976dbf
10 changed files with 73 additions and 24 deletions

View File

@@ -119,6 +119,7 @@ public abstract class PathHandler implements HttpHandler {
}
public static boolean sendContent(HttpExchange ex, Object o) throws IOException {
if (o instanceof JSONObject) ex.getResponseHeaders().add(CONTENT_TYPE, JSON);
return sendContent(ex, HTTP_OK, o.toString().getBytes(UTF_8));
}