Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

fix: wrong device param of command list #431

Merged
merged 3 commits into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/cmd/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func handleWriteCommand(cmd *cobra.Command, args []string) error {

func handleListCommand(cmd *cobra.Command, args []string) error {
// issue list commands with specified device name
if deviceName != "" {
if commandDeviceName != "" {
response, err := getCoreCommandService().GetCommandClient().DeviceCoreCommandsByDeviceName(context.Background(), commandDeviceName)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func handleListEvents(cmd *cobra.Command, args []string) error {
var err error

client := getCoreDataService().GetEventClient()
response, err := client.AllEvents(context.Background(), offset, limit)
response, err := client.AllEvents(context.Background(), eventOffset, eventLimit)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/reading.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func handleListReadings(cmd *cobra.Command, args []string) error {
var err error

client := getCoreDataService().GetReadingClient()
response, err := client.AllReadings(context.Background(), offset, limit)
response, err := client.AllReadings(context.Background(), readingOffset, readingLimit)
if err != nil {
return err
}
Expand Down