Implemented phase 3 for the POC prototype in the Website service.
This commit is contained in:
1 parent
b1ceed7790
commit
0dc3fe6bea
29 files changed
+4089
-66
No files matched your search
@@ -71,6 +71,7 @@ func application(
|
||||
logLevel: reader.logLevel,
|
||||
probe: Probe(fluent: fluent),
|
||||
accounts: AccountRepository(fluent: fluent),
|
||||
trade: TradeRepository(fluent: fluent),
|
||||
repository: repository,
|
||||
listings: await homeListings(
|
||||
from: repository,
|
||||
@@ -184,6 +185,7 @@ private func logger(
|
||||
/// - logLevel: the level the request-logging middleware logs at.
|
||||
/// - probe: the probe consulted by the `HealthController` readiness route.
|
||||
/// - accounts: the repository the `SessionController` finds and creates accounts through.
|
||||
/// - trade: the repository the `TradeController` reads and writes conversations, offers, and sales through.
|
||||
/// - repository: the repository the `CatalogueController` reads the shops and listings through.
|
||||
/// - listings: the listings the landing page shows in its rows.
|
||||
/// - Returns: the configured router.
|
||||
@@ -200,6 +202,7 @@ private func router(
|
||||
logLevel: Logger.Level,
|
||||
probe: Probe,
|
||||
accounts: AccountRepository,
|
||||
trade: TradeRepository,
|
||||
repository: CatalogueRepository,
|
||||
listings: HomeListings
|
||||
) -> Router<AppRequestContext> {
|
||||
@@ -209,7 +212,7 @@ private func router(
|
||||
context: AppRequestContext.self,
|
||||
options: .autoGenerateHeadEndpoints
|
||||
)
|
||||
let sessions = SessionStore()
|
||||
let sessions = SessionStore(trade: trade)
|
||||
|
||||
router.addMiddleware {
|
||||
LogRequestsMiddleware(logLevel)
|
||||
@@ -257,6 +260,13 @@ private func router(
|
||||
assetVersion: assetVersion,
|
||||
analytics: analytics
|
||||
)
|
||||
TradeController<AppRequestContext>(
|
||||
trade: trade,
|
||||
catalogue: repository,
|
||||
sessions: sessions,
|
||||
assetVersion: assetVersion,
|
||||
analytics: analytics
|
||||
)
|
||||
HealthController<AppRequestContext>(
|
||||
probe: probe
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user