Skip to content

Commit

Permalink
Remove unused constant, be more specific about states that merit a check
Browse files Browse the repository at this point in the history
  • Loading branch information
elffjs committed Nov 5, 2024
1 parent ec9bbb5 commit d317c38
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/controllers/user_devices_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,6 @@ func (udc *UserDevicesController) GetUserDevices(c *fiber.Ctx) error {
}

{
const sourcePrefix = "dimo/integration/"
type checkKey struct {
TokenID uint32
IntegrationID string
Expand All @@ -448,8 +447,8 @@ func (udc *UserDevicesController) GetUserDevices(c *fiber.Ctx) error {
}
for _, udai := range ud.R.UserDeviceAPIIntegrations {
// TODO(elffjs): Really no point in doing this for synthetics if the job hasn't started.
// Hard to tell this at this point
if udai.Status != "Active" {
// Should check for aftermarket or synthetic pairing, ideally.
if udai.Status == models.UserDeviceAPIIntegrationStatusPending || udai.Status == models.UserDeviceAPIIntegrationStatusPendingFirstData {
tok, _ := ud.TokenID.Uint64()
toCheck[checkKey{uint32(tok), udai.IntegrationID}] = udai
}
Expand Down

0 comments on commit d317c38

Please sign in to comment.