Actually use cache

This commit is contained in:
2025-10-10 22:54:56 +02:00
parent 3fbde26d1c
commit addb5773fe
2 changed files with 10 additions and 9 deletions

View File

@@ -89,7 +89,7 @@ type FactoryDetails struct {
type Route struct {
ContentTypeID int `json:"content_type_id"`
DestinationPinID int `json:"destination_pin_id"`
Quantity int `json:"quantity"`
Quantity float64 `json:"quantity"`
RouteID int `json:"route_id"`
SourcePinID int `json:"source_pin_id"`
Waypoints []int `json:"waypoints"`

View File

@@ -64,11 +64,12 @@ func main() {
// Configure SSO to use existing fasthttp router
sso.SetRouter(r)
// Create ESI client
esiClient := esi.NewDirectESI()
// Create ESI client with caching
directESI := esi.NewDirectESI()
cachedESI := esi.NewCachedESI(directESI, database.Cache())
// Create route handler with dependencies
routeHandler := routes.NewRouteHandler(sso, webhook, esiClient)
routeHandler := routes.NewRouteHandler(sso, webhook, cachedESI)
routeHandler.SetupRoutes(r)
logger.Info("Starting web server on 0.0.0.0:%s", options.GlobalOptions.Port)