feat(skills): 场景预设 - 提供公开只读目录并校验内置技能引用 (#603)

This commit is contained in:
Wyatt_K authored and ddCat committed 2026-09-23 16:01:27 +08:00
1 parent 7ebdd06268
commit ec81a1b92b
8 files changed
+364

No files matched your search

+10
View File
@@ -91,6 +91,16 @@ func RegisterSkillRoutes(r *gin.RouterGroup, svc *service.Service) {
ok(c, result)
})
r.GET("/skills/presets", func(c *gin.Context) {
// 场景预设目录:公开只读的市场元数据(与 /openapi.yaml 同模式,无用户数据)。
presets, err := svc.SkillPresets()
if err != nil {
failService(c, err)
return
}
ok(c, gin.H{"presets": presets})
})
r.GET("/skills/added", func(c *gin.Context) {
user, err := currentUser(c, svc)
if err != nil {