Remove comments

This commit is contained in:
2025-01-13 20:41:41 +01:00
parent 2f13d7a76a
commit e8ced857e0

View File

@ -22,7 +22,6 @@ func (v *VoterModel) InsertMultiple(identities []string, electionID int) ([]int,
}
defer tx.Rollback()
// Prepare the statement once to reuse
stmt, err := tx.Prepare(`
INSERT INTO voters (identity, election_id)
VALUES (?, ?)`)
@ -31,10 +30,8 @@ func (v *VoterModel) InsertMultiple(identities []string, electionID int) ([]int,
}
defer stmt.Close()
// Store all voter IDs
voterIDs := make([]int, 0, len(identities))
// Execute statement for each identity
for _, identity := range identities {
result, err := stmt.Exec(identity, electionID)
if err != nil {