Skip to content

Commit

Permalink
fix: fix linting errors
Browse files Browse the repository at this point in the history
Signed-off-by: osamamagdy <[email protected]>
  • Loading branch information
osamamagdy committed Oct 22, 2024
1 parent b7e0cd5 commit 82dce72
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions samples/application/ccapi/common/resmgnt.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type fabricLedgerClient struct {
// 1. Get sdk
// 2. Use sdk to create a ClientProvider ()
// 3. From client provider create resmgmt Client
//
// You can then use this .Client to call for specific functionalities
func NewFabricResmgmtClient(orgName, userName string, opts ...resmgmt.ClientOption) (*fabricResmgtmClient, error) {
sdk, err := GetSDK()
Expand Down Expand Up @@ -58,6 +59,7 @@ func NewFabricResmgmtClient(orgName, userName string, opts ...resmgmt.ClientOpti
// 1. Get sdk
// 2. Use sdk to create a ChannelProvider ()
// 3. From channel provider create channel Client
//
// You can then use this .Client to call for specific functionalities
func NewFabricChClient(channelName, userName, orgName string) (*fabricChannelClient, error) {
sdk, err := GetSDK()
Expand Down Expand Up @@ -87,6 +89,7 @@ func NewFabricChClient(channelName, userName, orgName string) (*fabricChannelCli
// 1. Get sdk
// 2. Use sdk to create a ChannelProvider ()
// 3. From channel provider create ledger Client
//
// You can then use this .Client to call for specific functionalities
func NewFabricLedgerClient(channelName, user, orgName string) (*fabricLedgerClient, error) {
sdk, err := GetSDK()
Expand Down
8 changes: 4 additions & 4 deletions samples/application/ccapi/handlers/qscc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/hex"
"fmt"
"net/http"

"github.com/gin-gonic/gin"
"github.com/hyperledger-labs/ccapi/chaincode"
"github.com/hyperledger-labs/ccapi/common"
Expand All @@ -25,7 +25,7 @@ func QueryQSCC(c *gin.Context) {
case "getBlockByNumber":
getBlockByNumber(c, channelName)
case "getBlockByHash":
getBlockByHash(c, channelName)
getBlockByHash(c, channelName)
case "getTransactionByID":
getTransactionByID(c, channelName)
case "getChainInfo":
Expand Down Expand Up @@ -147,7 +147,7 @@ func getBlockByHash(c *gin.Context, channelName string) {
}

result, err := chaincode.QueryGateway(channelName, "qscc", "GetBlockByHash", user, []string{channelName, string(hashBytes)})

if err != nil {
err, status := common.ParseError(err)
common.Abort(c, status, err)
Expand Down Expand Up @@ -448,4 +448,4 @@ func decodeProcessedTransaction(t []byte) (map[string]interface{}, error) {
}

return processedTransactionMap, nil
}
}

0 comments on commit 82dce72

Please sign in to comment.