Fix error in postgres store
This commit is contained in:
parent
2f86169572
commit
1d0d1aa20f
@ -57,18 +57,13 @@ RETURNING id;`
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
l.ID = id
|
l.ID = id
|
||||||
return nil
|
return tx.Commit()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *PostgresStore) All() ([]models.LoginAttempt, error) {
|
func (s *PostgresStore) All() ([]models.LoginAttempt, error) {
|
||||||
stmt := `SELECT date, remote_ip, username, password, client_version, connection_uuid, country FROM login_attempts`
|
stmt := `SELECT date, remote_ip, username, password, client_version, connection_uuid, country FROM login_attempts`
|
||||||
|
|
||||||
tx, err := s.db.Begin()
|
rows, err := s.db.Query(stmt)
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
rows, err := tx.Query(stmt)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user