From eb604852a835870d933742287a4a3eba5e4b78be Mon Sep 17 00:00:00 2001 From: Nex Date: Fri, 12 Jun 2020 18:20:27 +0800 Subject: [PATCH] Update grpc-gateway config --- grpc/pb/bdware/bdledger/api/grpc-gateway.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/grpc/pb/bdware/bdledger/api/grpc-gateway.yml b/grpc/pb/bdware/bdledger/api/grpc-gateway.yml index 7f1cd1a..fff8ad2 100644 --- a/grpc/pb/bdware/bdledger/api/grpc-gateway.yml +++ b/grpc/pb/bdware/bdledger/api/grpc-gateway.yml @@ -11,26 +11,23 @@ http: - selector: bdware.bdledger.api.Ledger.GetLedgers get: /v0/ledgers - selector: bdware.bdledger.api.Ledger.SendTransaction - post: /v0/transactions + post: /v0/ledgers/{ledger}/transactions body: "*" - selector: bdware.bdledger.api.Query.GetBlockByHash - post: /v0/blocks/{hash} - body: "*" + get: /v0/ledgers/{ledger}/blocks/{hash} - selector: bdware.bdledger.api.Query.GetBlocks - post: /v0/blocks + post: /v0/ledgers/{ledger}/blocks/query body: "*" - selector: bdware.bdledger.api.Query.CountBlocks - post: /v0/blocks/count + post: /v0/ledgers/{ledger}/blocks/count body: "*" - selector: bdware.bdledger.api.Query.GetTransactionByHash - post: /v0/transactions/{hash} - body: "*" + get: /v0/ledgers/{ledger}/transactions/{hash} - selector: bdware.bdledger.api.Query.GetTransactionByBlockHashAndIndex - post: /v0/blocks/{block_hash}/transactions/{index} - body: "*" + get: /v0/ledgers/{ledger}/blocks/{block_hash}/transactions/{index} - selector: bdware.bdledger.api.Query.GetTransactions - post: /v0/transactions + post: /v0/ledgers/{ledger}/transactions/query body: "*" - selector: bdware.bdledger.api.Query.CountTransactions - post: /v0/transactions/count + post: /v0/ledgers/{ledger}/transactions/count body: "*"