Refactor module binding to rely on Type

This commit is contained in:
2025-11-18 16:11:13 +08:00
parent 347eb3adc5
commit fc2c46a9df
10 changed files with 46 additions and 68 deletions

View File

@@ -10,6 +10,7 @@ import (
"github.com/valyala/fasthttp"
"github.com/any-hub/any-hub/internal/config"
"github.com/any-hub/any-hub/internal/hubmodule"
"github.com/any-hub/any-hub/internal/server"
)
@@ -102,6 +103,8 @@ func testRouteWithModule(moduleKey string) *server.HubRoute {
Domain: "test.local",
Type: "custom",
},
ModuleKey: moduleKey,
Module: hubmodule.ModuleMetadata{
Key: moduleKey,
},
}
}