Minor fixes and formatting

delete should be called on the existing transaction for users.
Added an empty line in roles

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
This commit is contained in:
Ethan Wellenreiter 2025-05-07 10:24:53 -04:00
parent 30b4292c4a
commit 780b646d68
2 changed files with 2 additions and 1 deletions

View File

@ -23,6 +23,7 @@ func (s *SQLRolesStore) GetByName(ctx context.Context, name string) (*Role, erro
return role, nil
}
func (s *SQLRolesStore) GetById(ctx context.Context, id int64) (*Role, error) {
ctx, cancel := context.WithTimeout(ctx, QueryTimeoutDuration)
defer cancel()

View File

@ -195,7 +195,7 @@ func (s *SQLUsersStore) delete(ctx context.Context, id int64, tx *sql.Tx) error
ctx, cancel := context.WithTimeout(ctx, QueryTimeoutDuration)
defer cancel()
res, err := s.db.ExecContext(ctx, query, id)
res, err := tx.ExecContext(ctx, query, id)
if err != nil {
return err
}