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
This commit is contained in:
2026-03-05 16:28:24 -05:00
parent 605aff104b
commit 5e97f14008
4 changed files with 102 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
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)
}