- 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
11 lines
286 B
Go
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)
|
|
}
|