Skip to content

Commit

Permalink
notifier: Avoid double reference
Browse files Browse the repository at this point in the history
I guess the pgx lib changed to not account for this.

Signed-off-by: crozzy <joseph.crosland@gmail.com>
  • Loading branch information
crozzy committed Mar 28, 2023
1 parent a433c93 commit 5446e49
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions notifier/postgres/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ func (s *Store) Notifications(ctx context.Context, id uuid.UUID, page *notifier.
for rows.Next() {
ns = append(ns, notifier.Notification{})
n := &ns[len(ns)-1]
if err := rows.Scan(&n.ID, &n); err != nil {
if err := rows.Scan(&n.ID, n); err != nil {
return err
}
}

if err := rows.Err(); err != nil {
return err
}
Expand Down Expand Up @@ -164,7 +165,7 @@ func (s *Store) Notifications(ctx context.Context, id uuid.UUID, page *notifier.
for rows.Next() {
ns = append(ns, notifier.Notification{})
n := &ns[len(ns)-1]
if err := rows.Scan(&n.ID, &n); err != nil {
if err := rows.Scan(&n.ID, n); err != nil {
return err
}
}
Expand Down

0 comments on commit 5446e49

Please sign in to comment.