Skip to content

Commit

Permalink
Query cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
elffjs committed Aug 5, 2024
1 parent cfc7ea7 commit 24d87a9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/service/identity/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package identity

import (
"context"
"fmt"
"errors"
"net/http"
"time"

Expand Down Expand Up @@ -34,7 +34,7 @@ func (i *APIClient) GetAftermarketDevice(ctx context.Context, address *common.Ad
}

if resp.AftermarketDevice.Vehicle == nil {
return nil, fmt.Errorf("no vehicle attached to device")
return nil, errors.New("no vehicle attached to device")
}

return &DeviceInfos{
Expand All @@ -46,8 +46,8 @@ func (i *APIClient) GetAftermarketDevice(ctx context.Context, address *common.Ad
}

type DeviceInfos struct {
ManufacturerTokenID int `json:"manufacturerTokenId"`
VehicleTokenID int `json:"vehicleTokenId"`
AftermarketDeviceTokenID int `json:"aftermarketDeviceTokenId"`
ManufacturerName string `json:"manufacturerName"`
ManufacturerTokenID int
VehicleTokenID int
AftermarketDeviceTokenID int
ManufacturerName string
}

0 comments on commit 24d87a9

Please sign in to comment.