re-add txn to SelectPeeks

This commit is contained in:
Matthew Hodgson 2020-09-02 10:07:49 +01:00
parent 75b91ac9e5
commit b6cc4417cc
3 changed files with 6 additions and 6 deletions

View file

@ -136,9 +136,9 @@ func (s *peekStatements) DeletePeeks(
}
func (s *peekStatements) SelectPeeks(
ctx context.Context, userID, deviceID string,
ctx context.Context, txn *sql.Tx, userID, deviceID string,
) (peeks []types.Peek, err error) {
rows, err := s.selectPeeksStmt.QueryContext(ctx, userID, deviceID)
rows, err := sqlutil.TxStmt(txn, s.selectPeeksStmt).QueryContext(ctx, userID, deviceID)
if err != nil {
return
}