Skip to content

Commit

Permalink
Merge pull request #930 from gobitfly/BEDS-472/fix-device-id
Browse files Browse the repository at this point in the history
(BEDS-472) fixed empty device id
  • Loading branch information
remoterami authored Oct 9, 2024
2 parents e341289 + b955928 commit 81862de
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions backend/pkg/api/data_access/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -828,10 +828,10 @@ func (d *DataAccessService) GetNotificationSettings(ctx context.Context, userId
// -------------------------------------
// Get the paired devices
pairedDevices := []struct {
DeviceIdentifier string `db:"device_identifier"`
CreatedTs time.Time `db:"created_ts"`
DeviceName string `db:"device_name"`
NotifyEnabled bool `db:"notify_enabled"`
DeviceIdentifier sql.NullString `db:"device_identifier"`
CreatedTs time.Time `db:"created_ts"`
DeviceName string `db:"device_name"`
NotifyEnabled bool `db:"notify_enabled"`
}{}
wg.Go(func() error {
err := d.userReader.SelectContext(ctx, &pairedDevices, `
Expand Down Expand Up @@ -928,7 +928,7 @@ func (d *DataAccessService) GetNotificationSettings(ctx context.Context, userId

for _, device := range pairedDevices {
result.PairedDevices = append(result.PairedDevices, t.NotificationPairedDevice{
Id: device.DeviceIdentifier,
Id: device.DeviceIdentifier.String,
PairedTimestamp: device.CreatedTs.Unix(),
Name: device.DeviceName,
IsNotificationsEnabled: device.NotifyEnabled,
Expand Down

0 comments on commit 81862de

Please sign in to comment.