功能:完善渠道模型批量操作

支持模型管理批量删除,并在拉取模型时提供全选、取消全选和选择数量提示。

同时保持首屏品牌中立,补充后端原子删除与管理员界面回归测试。
This commit is contained in:
Ray committed 2026-09-07 10:18:06 +08:00
1 parent df94c3bdf1
commit 2ce443731d
9 files changed
+361 -39

No files matched your search

@@ -0,0 +1,23 @@
package handler
import (
"testing"
"infinite-canvas/backend/internal/service"
"github.com/gin-gonic/gin"
)
func TestFinanceRoutesExposeChannelModelBatchDelete(t *testing.T) {
gin.SetMode(gin.TestMode)
router := gin.New()
RegisterFinanceRoutes(router.Group("/api"), &service.Service{})
const wanted = "POST /api/admin/channels/:id/models/batch-delete"
for _, route := range router.Routes() {
if route.Method+" "+route.Path == wanted {
return
}
}
t.Fatalf("route %s is not registered", wanted)
}