Files
bookhoard/internal/router/jobs.go
T
john-okeefe 5e97f14008 Add Jobs API for background task management
- Add JobsHandler with CreateJob and GetJobStatus endpoints
- Add jobs router with POST /api/jobs and GET /api/jobs/:jobId routes
- Integrate JobsHandler into main server and router config
2026-03-05 16:28:24 -05:00

11 lines
286 B
Go

package router
func registerJobRoutes(cfg *Config) {
e := cfg.Echo
jwtMiddleware := createJWTMiddleware(cfg)
protected := e.Group("/api", jwtMiddleware)
jobs := protected.Group("/jobs")
jobs.POST("", cfg.JobsHandler.CreateJob)
jobs.GET("/:jobId", cfg.JobsHandler.GetJobStatus)
}