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:
parent
30b4292c4a
commit
780b646d68
@ -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()
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user