19 lines
641 B
Go
19 lines
641 B
Go
package api
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
|
|
eduApi "veza-backend-api/internal/api/education"
|
|
eduCore "veza-backend-api/internal/core/education"
|
|
)
|
|
|
|
// setupEducationRoutes configure les routes d'éducation (cours, tutoriels)
|
|
func (r *APIRouter) setupEducationRoutes(router *gin.RouterGroup) {
|
|
if r.config == nil || r.config.AuthMiddleware == nil {
|
|
return
|
|
}
|
|
courseManager := eduCore.NewCourseManager(r.logger)
|
|
tutorialManager := eduCore.NewTutorialManager(r.logger)
|
|
eduHandler := eduApi.NewHandler(courseManager, tutorialManager, r.logger)
|
|
eduApi.SetupRoutes(router, eduHandler, r.config.JWTSecret, r.config.AuthMiddleware)
|
|
}
|