mirror of
https://github.com/corda/corda.git
synced 2024-12-26 16:11:12 +00:00
Adding the @Produces annotation for the GET endpoints in the Network Map service (#652)
This commit is contained in:
parent
bf5f812b68
commit
296e74aca7
@ -115,10 +115,12 @@ class NetworkMapWebService(private val nodeInfoStorage: NodeInfoStorage,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
||||||
fun getNetworkMap(): Response = createResponse(currentSignedNetworkMap, addCacheTimeout = true)
|
fun getNetworkMap(): Response = createResponse(currentSignedNetworkMap, addCacheTimeout = true)
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("node-info/{nodeInfoHash}")
|
@Path("node-info/{nodeInfoHash}")
|
||||||
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
||||||
fun getNodeInfo(@PathParam("nodeInfoHash") nodeInfoHash: String): Response {
|
fun getNodeInfo(@PathParam("nodeInfoHash") nodeInfoHash: String): Response {
|
||||||
// Only serve node info if its in the current network map, otherwise return 404.
|
// Only serve node info if its in the current network map, otherwise return 404.
|
||||||
logger.trace { "Processing node info request for hash: '$nodeInfoHash'" }
|
logger.trace { "Processing node info request for hash: '$nodeInfoHash'" }
|
||||||
@ -134,6 +136,7 @@ class NetworkMapWebService(private val nodeInfoStorage: NodeInfoStorage,
|
|||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("network-parameters/{hash}")
|
@Path("network-parameters/{hash}")
|
||||||
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
||||||
fun getNetworkParameters(@PathParam("hash") hash: String): Response {
|
fun getNetworkParameters(@PathParam("hash") hash: String): Response {
|
||||||
val signedNetParams = networkMapStorage.getSignedNetworkParameters(SecureHash.parse(hash))
|
val signedNetParams = networkMapStorage.getSignedNetworkParameters(SecureHash.parse(hash))
|
||||||
logger.trace { "Precessed network parameter request for hash: '$hash'" }
|
logger.trace { "Precessed network parameter request for hash: '$hash'" }
|
||||||
|
Loading…
Reference in New Issue
Block a user