Added GET /arbitrary/relaymode API endpoint, which returns whether relay mode is enabled in the settings or not.

This commit is contained in:
CalDescent 2022-01-07 14:38:05 +00:00
parent d8cbec41d2
commit 67e424a32a

View File

@ -328,6 +328,23 @@ public class ArbitraryResource {
}
}
@GET
@Path("/relaymode")
@Operation(
summary = "Returns whether relay mode is enabled or not",
responses = {
@ApiResponse(
content = @Content(mediaType = MediaType.TEXT_PLAIN, schema = @Schema(type = "boolean"))
)
}
)
@ApiErrors({ApiError.REPOSITORY_ISSUE})
public boolean getRelayMode() {
Security.checkApiCallAllowed(request);
return Settings.getInstance().isRelayModeEnabled();
}
@GET
@Path("/hosted/transactions")
@Operation(