protoype: list raw events on mock mode reports page
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"ruben/inventory2/domains/authentication"
|
||||
etsy_platform "ruben/inventory2/domains/platforms/etsy"
|
||||
"ruben/inventory2/domains/raw_events"
|
||||
"ruben/inventory2/domains/reports"
|
||||
"ruben/inventory2/logging"
|
||||
"ruben/inventory2/server/api"
|
||||
"ruben/inventory2/server/auth"
|
||||
@@ -30,6 +31,7 @@ func NewRouter(
|
||||
contentDir string,
|
||||
rawEvents *raw_events.Store,
|
||||
accts *accounts.Store,
|
||||
reps *reports.Store,
|
||||
etsy *etsy_platform.Platform,
|
||||
authr *authentication.Authenticator,
|
||||
) *Router {
|
||||
@@ -59,6 +61,7 @@ func NewRouter(
|
||||
"/ui",
|
||||
rawEvents,
|
||||
accts,
|
||||
reps,
|
||||
etsy,
|
||||
authM.Authenticate(),
|
||||
)
|
||||
|
||||
@@ -16,6 +16,7 @@ import (
|
||||
"ruben/inventory2/domains/accounts"
|
||||
etsy_platform "ruben/inventory2/domains/platforms/etsy"
|
||||
"ruben/inventory2/domains/raw_events"
|
||||
"ruben/inventory2/domains/reports"
|
||||
"ruben/inventory2/logging"
|
||||
"ruben/inventory2/server/auth"
|
||||
"ruben/inventory2/server/response"
|
||||
@@ -28,6 +29,7 @@ type (
|
||||
templater *templater.Templater
|
||||
rawEvents *raw_events.Store
|
||||
accts *accounts.Store
|
||||
reports *reports.Store
|
||||
etsy *etsy_platform.Platform
|
||||
}
|
||||
|
||||
@@ -44,6 +46,7 @@ func Routes(
|
||||
uiPath string,
|
||||
rawEvents *raw_events.Store,
|
||||
accts *accounts.Store,
|
||||
reps *reports.Store,
|
||||
etsy *etsy_platform.Platform,
|
||||
authenticate gin.HandlerFunc,
|
||||
) {
|
||||
@@ -143,6 +146,7 @@ func Routes(
|
||||
}),
|
||||
rawEvents: rawEvents,
|
||||
accts: accts,
|
||||
reports: reps,
|
||||
etsy: etsy,
|
||||
}
|
||||
|
||||
@@ -189,6 +193,8 @@ func (s *webpageRouter) serveTemplate(c *gin.Context) (response.Response, error)
|
||||
newURLCalculator(r.URL),
|
||||
"Accounts",
|
||||
s.accts.WithContext(ctx),
|
||||
"Reports",
|
||||
s.reports.WithContext(ctx),
|
||||
"Etsy",
|
||||
s.etsy.WithContext(ctx),
|
||||
"MockMode",
|
||||
|
||||
Reference in New Issue
Block a user