fix(cap): keep only /api/v1/cap routes

Drop the unversioned /api/cap aliases so Challenge and Redeem exist only under /api/v1/cap.
This commit is contained in:
ryan
2026-08-30 16:39:40 +08:00
parent 56c650c5b5
commit 12b4c3e54c
3 changed files with 9 additions and 9 deletions
+1 -5
View File
@@ -86,11 +86,7 @@ func (p *Plugin) Apply(ctx *core.Context) error {
capGroup.POST("/challenge", Challenge)
capGroup.POST("/redeem", Redeem)
}
legacy := ctx.Router().Group("/api/cap")
legacy.POST("/challenge", Challenge)
legacy.POST("/redeem", Redeem)
ctx.Router().RegisterWhitelist("/api/cap/challenge", "/api/cap/redeem")
ctx.Router().RegisterWhitelist("/api/v1/cap/challenge", "/api/v1/cap/redeem")
// Register Settings Schemas
ctx.Settings().Register(extpoints.SettingSchema{