mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 12:23:22 +00:00
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.
15 lines
250 B
Go
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,
|
|
})
|
|
}
|