fixing bugs

This commit is contained in:
2025-10-30 19:58:22 +01:00
parent 19c6bf1629
commit aa09b90896
3 changed files with 8 additions and 9 deletions

View File

@@ -37,6 +37,7 @@ public class CoreDataVerticle extends AbstractVerticle {
CoreDataRouter.mount(router, vertx, pool);
RouterUtil.attachLogger(router);
registerLogicVerticleConsumer();
vertx.createHttpServer()

View File

@@ -20,7 +20,8 @@ public class CoreLogicVerticle extends AbstractVerticle {
Router router = Router.router(vertx);
CoreLogicRouter.mount(router, vertx, pool);
RouterUtil.attachLogger(router);
vertx.createHttpServer()
.requestHandler(router)
.listen(configManager.getIntProperty("sso.logic.port"), res -> {

View File

@@ -1,7 +1,5 @@
package net.miarma.api.microservices.huertos.handlers;
import com.google.gson.Gson;
import io.vertx.core.Vertx;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.web.RoutingContext;
@@ -19,14 +17,13 @@ public class MemberLogicHandler {
}
public void login(RoutingContext ctx) {
String body = ctx.body().asString();
JsonObject bodyJson = new Gson().fromJson(body, JsonObject.class);
JsonObject body = ctx.body().asJsonObject();
JsonObject request = new JsonObject()
.put("action", "login")
.put("email", bodyJson.getString("email", null))
.put("userName", bodyJson.getString("userName", null))
.put("password", bodyJson.getString("password"))
.put("keepLoggedIn", bodyJson.getBoolean("keepLoggedIn", false));
.put("email", body.getString("email", null))
.put("userName", body.getString("userName", null))
.put("password", body.getString("password"))
.put("keepLoggedIn",body.getBoolean("keepLoggedIn", false));
vertx.eventBus().request(Constants.HUERTOS_EVENT_BUS, request, ar -> {
if (ar.succeeded()) {