feat(platform): add the notification inbox and deterministic match search
This commit is contained in:
1 parent
5edff21d2d
commit
0b11021b16
169 files changed
+17083
-443
No files matched your search
@@ -23,6 +23,7 @@ import (
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
|
||||
httpadapter "lincodex/backend/internal/adapter/primary/http"
|
||||
apiadapter "lincodex/backend/internal/adapter/primary/http/api"
|
||||
"lincodex/backend/internal/adapter/primary/http/problem"
|
||||
v1 "lincodex/backend/internal/adapter/primary/http/v1"
|
||||
"lincodex/backend/internal/adapter/secondary/argon2id"
|
||||
@@ -524,6 +525,21 @@ func newAssessmentAttemptHTTPHarnessWithOptions(
|
||||
env *testEnvironment,
|
||||
categories assessment.AssessmentCategoryDecisionSettings,
|
||||
extra func(assessmentHarnessParts) []v1.HandlerOption,
|
||||
) *assessmentAttemptHTTPHarness {
|
||||
t.Helper()
|
||||
return newAssessmentAttemptHTTPHarnessWithMiddleware(ctx, t, env, categories, extra, nil)
|
||||
}
|
||||
|
||||
// newAssessmentAttemptHTTPHarnessWithMiddleware also mounts the operation
|
||||
// middleware that middleware returns, after extra has built its handlers, so a
|
||||
// scenario can add the owner company context to the same router.
|
||||
func newAssessmentAttemptHTTPHarnessWithMiddleware(
|
||||
ctx context.Context,
|
||||
t *testing.T,
|
||||
env *testEnvironment,
|
||||
categories assessment.AssessmentCategoryDecisionSettings,
|
||||
extra func(assessmentHarnessParts) []v1.HandlerOption,
|
||||
middleware func() []apiadapter.Middleware,
|
||||
) *assessmentAttemptHTTPHarness {
|
||||
t.Helper()
|
||||
pool := env.newPool(ctx, t)
|
||||
@@ -585,7 +601,11 @@ func newAssessmentAttemptHTTPHarnessWithOptions(
|
||||
options = append(options, extra(assessmentHarnessParts{pool: pool, transactor: transactor, keyring: keyring, clock: clock})...)
|
||||
}
|
||||
handler := v1.NewHandler(healthHandler, responder, options...)
|
||||
router, err := httpadapter.NewRouter(healthHandler, handler, identityHandler.SessionSecurity(), responder, prometheus.New(), logger, nil)
|
||||
var operationMiddleware []apiadapter.Middleware
|
||||
if middleware != nil {
|
||||
operationMiddleware = middleware()
|
||||
}
|
||||
router, err := httpadapter.NewRouter(healthHandler, handler, identityHandler.SessionSecurity(), responder, prometheus.New(), logger, nil, operationMiddleware...)
|
||||
if err != nil {
|
||||
t.Fatalf("NewRouter() error = %v", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user