Skip to content

Commit

Permalink
Fix status Api (#3152)
Browse files Browse the repository at this point in the history
  • Loading branch information
g-duval authored Nov 28, 2024
1 parent 326bb37 commit 16be705
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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 {
}
Expand All @@ -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;
}
}

0 comments on commit 16be705

Please sign in to comment.