package handlers import ( "git.godopu.com/lab/landing_page/backend/internal/httpx" "git.godopu.com/lab/landing_page/backend/internal/repository" "github.com/gin-gonic/gin" ) type StandardizationHandler struct { repo *repository.StandardizationRepository } func NewStandardizationHandler(repo *repository.StandardizationRepository) *StandardizationHandler { return &StandardizationHandler{repo: repo} } func (h *StandardizationHandler) GetStandardsBodies(c *gin.Context) { bodies, err := h.repo.GetStandardsBodiesWithProjects(c.Request.Context()) if err != nil { httpx.InternalServerError(c, "Failed to retrieve standards bodies: "+err.Error()) return } httpx.OK(c, bodies) }