diff options
Diffstat (limited to 'syncapi/storage/postgres')
-rw-r--r-- | syncapi/storage/postgres/invites_table.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/syncapi/storage/postgres/invites_table.go b/syncapi/storage/postgres/invites_table.go index eed58c15..c0dd42c5 100644 --- a/syncapi/storage/postgres/invites_table.go +++ b/syncapi/storage/postgres/invites_table.go @@ -110,9 +110,10 @@ func (s *inviteEventsStatements) InsertInviteEvent( } func (s *inviteEventsStatements) DeleteInviteEvent( - ctx context.Context, inviteEventID string, + ctx context.Context, txn *sql.Tx, inviteEventID string, ) (sp types.StreamPosition, err error) { - err = s.deleteInviteEventStmt.QueryRowContext(ctx, inviteEventID).Scan(&sp) + stmt := sqlutil.TxStmt(txn, s.deleteInviteEventStmt) + err = stmt.QueryRowContext(ctx, inviteEventID).Scan(&sp) return } |