Files
skillshare/internal/server/handler_create_skill.go
T
Willie 6e23f11be7 feat(server): add GET /api/skills/templates endpoint
Expose skill design patterns and categories via API for the upcoming
web UI skill creation wizard. Returns the full Patterns and Categories
lists from internal/skill/.

Route registered before GET /api/skills/{name} to avoid path conflict.
2026-03-18 22:35:02 +08:00

15 lines
250 B
Go

package server
import (
"net/http"
"skillshare/internal/skill"
)
func (s *Server) handleGetTemplates(w http.ResponseWriter, r *http.Request) {
writeJSON(w, map[string]any{
"patterns": skill.Patterns,
"categories": skill.Categories,
})
}