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

This commit is contained in:
ddCat committed 2026-09-19 09:54:27 +08:00
1 parent 6b40fe12df
commit 338c0ed860
49 files changed
+802 -276

No files matched your search

+6 -2
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)})
}