feat(transaction): #66 fix tests

This commit is contained in:
2025-05-16 11:00:23 +02:00
parent d69f2b2118
commit 81c190a2fc
3 changed files with 24 additions and 10 deletions

View File

@@ -170,6 +170,13 @@ func (db AuthSqlite) DeleteUser(userId uuid.UUID) error {
return types.ErrInternal
}
_, err = tx.Exec("DELETE FROM \"transaction\" WHERE user_id = ?", userId)
if err != nil {
_ = tx.Rollback()
log.Error("Could not delete user: %v", err)
return types.ErrInternal
}
err = tx.Commit()
if err != nil {
log.Error("Could not commit transaction: %v", err)