// Path: Backend/internal/handlers/api/answers/routes.go

package answers

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

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

func RegisterRoutes(app fiber.Router, auth *authmw.AuthMiddleware, h *Handler) {
	app.Get("/assignments/:assignmentId/answers", auth.RequireTeacher(), h.ListAnswersForAssignment)
	app.Get("/students/:studentId/answers", auth.RequireStudentSelfOrTeacher("studentId"), h.ListAnswersForStudent)
	app.Post("/answers", h.UpsertStudentAnswer)
	app.Patch("/answers/:answerId/review", auth.RequireTeacher(), h.UpdateAnswerReview)
}
