package questions

import (
	authmw "boostai-backend/internal/middleware"

	"github.com/gofiber/fiber/v2"
)

func RegisterRoutes(app fiber.Router, auth *authmw.AuthMiddleware, h *Handler) {
	app.Get("/teachers/:teacherId/questions", auth.RequireTeacherSelf("teacherId"), h.ListQuestionsByTeacher)
	app.Get("/questions/:questionId", h.GetQuestionByID)
	app.Get("/tags", h.ListTags)
	app.Post("/questions", auth.RequireTeacher(), h.CreateQuestion)
	app.Post("/questions/generate", auth.RequireTeacher(), h.GenerateQuestions)
	app.Post("/tags", auth.RequireTeacher(), h.CreateTag)
	app.Post("/questions/:questionId/tags", auth.RequireTeacher(), h.AttachTagToQuestion)
}
