package routes import ( "context" "git.x2erp.com/qdy/go-base/authbase" "git.x2erp.com/qdy/go-base/ctx" "git.x2erp.com/qdy/go-base/model/response" "git.x2erp.com/qdy/go-base/webx/router" "git.x2erp.com/qdy/go-db/factory/database" "git.x2erp.com/qdy/go-svc-configure/internal/service/bootconfig" ) func RegisterBootconfigRoutes(ws *router.RouterService, dbFactory *database.DBFactory) { // boot config ws.POST("/api/boot/configs", func(ctx context.Context, reqCtx *ctx.RequestContext) (*response.QueryResult[[]bootconfig.BootConfig], error) { return bootconfig.GetBootConfigs(ctx, dbFactory, reqCtx), nil }, ).Use(authbase.BasicAuth).Desc("获取boot配置项").Register() ws.POST("/api/boot/configs/search", func(keyword string, ctx context.Context, reqCtx *ctx.RequestContext) (*response.QueryResult[[]bootconfig.BootConfig], error) { return bootconfig.SearchBootConfigs(ctx, dbFactory, keyword, reqCtx), nil }, ).Use(authbase.BasicAuth).Desc("搜索boot配置项").Register() }