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,34 @@
package platform
import (
"github.com/gin-gonic/gin"
"base/internal/dto"
)
// ListSkills returns the list of skills for profile skill selection.
// @Summary list skills
// @Description returns all skills from the catalog for profile update skill selection
// @Tags Platform
// @Produce json
// @Success 200 {array} dto.Skill "list of skills"
// @Failure 500 {object} dto.ErrorResponse "internal server error"
// @Router /api/v1/platform/skills [get]
func (ctl *Controller) ListSkills(c *gin.Context) {
lg := ctl.logger.With().
Str("module", "platform").
Str("router", "platform").
Str("handler", "ListSkills").
Logger()
skills, err := ctl.skillService.List(c.Request.Context())
if err != nil {
lg.Error().Err(err).Msg("failed to list skills")
r := dto.InternalServerError()
c.JSON(r.Status, r)
return
}
r := dto.OK().WithData(skills)
c.JSON(r.Status, r)
}