From 16be705f25a781331fb137a406bd54abb10d0341 Mon Sep 17 00:00:00 2001 From: Guillaume Duval <117720964+g-duval@users.noreply.github.com> Date: Thu, 28 Nov 2024 10:38:19 +0100 Subject: [PATCH] Fix status Api (#3152) --- .../cloud/notifications/routers/StatusResource.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/com/redhat/cloud/notifications/routers/StatusResource.java b/backend/src/main/java/com/redhat/cloud/notifications/routers/StatusResource.java index 7e3d326235..8c2bb81dd6 100644 --- a/backend/src/main/java/com/redhat/cloud/notifications/routers/StatusResource.java +++ b/backend/src/main/java/com/redhat/cloud/notifications/routers/StatusResource.java @@ -1,10 +1,10 @@ package com.redhat.cloud.notifications.routers; import com.redhat.cloud.notifications.oapi.OApiFilter; +import io.vertx.core.json.JsonObject; import jakarta.ws.rs.GET; import jakarta.ws.rs.Path; import jakarta.ws.rs.Produces; -import jakarta.ws.rs.core.Response; import org.eclipse.microprofile.openapi.annotations.tags.Tag; import static com.redhat.cloud.notifications.Constants.API_NOTIFICATIONS_V_1_0; @@ -13,6 +13,8 @@ public class StatusResource { + static final JsonObject STATUS = new JsonObject("{\"status\":\"UP\"}"); + @Path(API_NOTIFICATIONS_V_1_0 + "/status") public static class V1 extends StatusResource { } @@ -24,7 +26,7 @@ public static class V2 extends StatusResource { @GET @Produces(APPLICATION_JSON) @Tag(name = OApiFilter.PRIVATE) - public Response getCurrentStatus() { - return Response.ok().build(); + public JsonObject getCurrentStatus() { + return STATUS; } }