package router

import (
	"bookhoard/internal/handlers"
)

func registerProgressRoutes(cfg *Config, scannerHandler *handlers.Handler) {
	e := cfg.Echo

	// JWT middleware for protected routes
	jwtMiddleware := createJWTMiddleware(cfg)
	protected := e.Group("/api", jwtMiddleware)

	// Universal Progress routes
	protected.GET("/progress/:id", scannerHandler.GetUniversalProgress)
	protected.POST("/progress/:id", scannerHandler.UpdateUniversalProgress)
	protected.GET("/progress/:id/history", scannerHandler.GetProgressHistory)
}
