refactor: move API key cleanup job to actor (#1687)

This commit is contained in:
Alessandro (Ale) Segala
2026-08-15 00:39:02 +02:00
committed by GitHub
parent 6fba970159
commit 2dc062ac0f
12 changed files with 303 additions and 147 deletions
@@ -40,7 +40,7 @@ func TestWithApiKeyAuthDisabled(t *testing.T) {
require.NoError(t, err)
userService := service.NewUserService(db, jwtService, nil, nil, nil, nil, nil)
apiKeyModule, err := apikey.New(t.Context(), apikey.Dependencies{DB: db})
apiKeyModule, err := apikey.New(t.Context(), apikey.Dependencies{DB: db, CleanupDisabled: true})
require.NoError(t, err)
authMiddleware := NewAuthMiddleware(apiKeyModule, userService, jwtService)