fix: remove unnecessary transaction
@@ -175,8 +175,8 @@ func (p *Persister) ClientAssertionJWTValid(ctx context.Context, jti string) err
}
func (p *Persister) SetClientAssertionJWT(ctx context.Context, jti string, exp time.Time) error {
- return p.transaction(ctx, func(ctx context.Context, c *pop.Connection) error {
// delete expired
+ c := p.Connection(ctx)
now := "now()"
if c.Dialect.Name() == "sqlite3" {
now = "CURRENT_TIMESTAMP"
@@ -192,9 +192,9 @@ func (p *Persister) SetClientAssertionJWT(ctx context.Context, jti string, exp t
} else if err != nil {
return err
}
+
// setting worked without a problem
return nil
- })
}
func (p *Persister) GetClientAssertionJWT(ctx context.Context, j string) (*oauth2.BlacklistedJTI, error) {
