feat(models): 模型目录与计费 - 按展示名分组并隔离管理员积分成本

This commit is contained in:
ddCat
2026-09-19 09:54:27 +08:00
parent 5ad05efb58
commit 237f2e2a6e
49 changed files with 802 additions and 276 deletions

View File

@@ -205,7 +205,11 @@ func RegisterFinanceRoutes(r *gin.RouterGroup, svc *service.Service) {
failService(c, err)
return
}
ok(c, gin.H{"models": items})
models := make([]adminChannelModelResponse, 0, len(items))
for _, item := range items {
models = append(models, adminChannelModel(item))
}
ok(c, gin.H{"models": models})
})
r.POST("/admin/channels/:id/models/fetch", func(c *gin.Context) {
user, err := currentUser(c, svc)
@@ -501,5 +505,5 @@ func saveChannelModel(c *gin.Context, svc *service.Service, id string) {
failService(c, err)
return
}
ok(c, gin.H{"model": item})
ok(c, gin.H{"model": adminChannelModel(*item)})
}