Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/mainflux/mainflux into NO…
Browse files Browse the repository at this point in the history
…ISSUE-clicerts
  • Loading branch information
rodneyosodo committed Jan 11, 2023
2 parents 19865a0 + b502af6 commit c99e8bf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cli/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var cmdMessages = []cobra.Command{
},
},
{
Use: "read <channel_id.subtopic> <thing_key>",
Use: "read <channel_id.subtopic> <user_token>",
Short: "Read messages",
Long: `Reads all channel messages`,
Run: func(cmd *cobra.Command, args []string) {
Expand Down
5 changes: 3 additions & 2 deletions pkg/sdk/go/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"net/http"
"strings"

"github.com/mainflux/mainflux/internal/apiutil"
"github.com/mainflux/mainflux/pkg/errors"
)

Expand Down Expand Up @@ -125,9 +126,9 @@ func (sdk mfSDK) RemoveBootstrap(id, token string) errors.SDKError {
return err
}

func (sdk mfSDK) Bootstrap(externalKey, externalID string) (BootstrapConfig, errors.SDKError) {
func (sdk mfSDK) Bootstrap(externalID, externalKey string) (BootstrapConfig, errors.SDKError) {
url := fmt.Sprintf("%s/%s/%s", sdk.bootstrapURL, bootstrapEndpoint, externalID)
_, body, err := sdk.processRequest(http.MethodGet, url, externalKey, string(CTJSON), nil, http.StatusOK)
_, body, err := sdk.processRequest(http.MethodGet, url, apiutil.ThingPrefix+externalKey, string(CTJSON), nil, http.StatusOK)
if err != nil {
return BootstrapConfig{}, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/sdk/go/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ type SDK interface {
RemoveBootstrap(id, token string) errors.SDKError

// Bootstrap returns Config to the Thing with provided external ID using external key.
Bootstrap(externalKey, externalID string) (BootstrapConfig, errors.SDKError)
Bootstrap(externalID, externalKey string) (BootstrapConfig, errors.SDKError)

// Whitelist updates Thing state Config with given ID belonging to the user identified by the given token.
Whitelist(cfg BootstrapConfig, token string) errors.SDKError
Expand Down

0 comments on commit c99e8bf

Please sign in to comment.