mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-07 08:06:37 +08:00
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:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user