initial commit

This commit is contained in:
m.zare
2026-04-10 18:25:21 +03:30
commit 77ca6c34a3
263 changed files with 34470 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
package platform
import (
"github.com/gin-gonic/gin"
"base/internal/dto"
)
// GetLanding returns the landing page data.
// @Summary get landing page
// @Description returns landing page with categories, specialist roles, assets by category, specialists, and blogs
// @Tags Landing
// @Accept json
// @Produce json
// @Success 200 {object} dto.Landing "landing page data"
// @Failure 500 {object} dto.ErrorResponse "internal server error"
// @Router /api/v1/landing [get]
func (ctl *Controller) GetLanding(c *gin.Context) {
lg := ctl.logger.With().
Str("module", "platform").
Str("router", "landing").
Str("handler", "GetLanding").
Logger()
resp, err := ctl.landingService.GetLanding(c.Request.Context())
if err != nil {
lg.Error().Err(err).Msg("failed to get landing page")
r := dto.InternalServerError()
c.JSON(r.Status, r)
return
}
r := dto.OK().WithData(resp.Data).WithMessage(resp.Message)
c.JSON(r.Status, r)
}