fix platform authorization and workflow integrity

This commit is contained in:
david
2026-07-29 15:54:20 +08:00
parent a7d318a013
commit 969d7271f9
26 changed files with 566 additions and 161 deletions

View File

@@ -135,7 +135,7 @@ func registerWalletRoute(group *gin.RouterGroup) {
basic.GET("/:identity", wallet.GetWalletBasic)
basic.PATCH("/:identity/status", wallet.UpdateWalletBasicStatus)
basic.POST("/:identity/recharge", wallet.RechargeWalletBasic)
basic.GET("/owner/:owner_type/:owner_identity", wallet.GetOrCreateOwnerWallet)
basic.POST("/owner/:owner_type/:owner_identity", wallet.GetOrCreateOwnerWallet)
bank := group.Group("/wallet_bank")
bank.GET("", wallet.ListWalletBank)
@@ -158,6 +158,7 @@ func registerWalletRoute(group *gin.RouterGroup) {
applyCash.GET("/:identity", wallet.GetWalletApplyCash)
applyCash.POST("/:identity/approve", wallet.ApproveWalletApplyCash)
applyCash.POST("/:identity/reject", wallet.RejectWalletApplyCash)
applyCash.POST("/:identity/complete", wallet.CompleteWalletApplyCash)
}
func registerCommerceRoute(group *gin.RouterGroup) {

View File

@@ -212,9 +212,10 @@ func TestPlatformFinanceContentRoutesFollowTheirContracts(t *testing.T) {
}
assertRouteMethods(t, routes, "/heqi/platform/v1/wallet_basic/:identity/status", http.MethodPatch)
assertRouteMethods(t, routes, "/heqi/platform/v1/wallet_basic/:identity/recharge", http.MethodPost)
assertRouteMethods(t, routes, "/heqi/platform/v1/wallet_basic/owner/:owner_type/:owner_identity", http.MethodGet)
assertRouteMethods(t, routes, "/heqi/platform/v1/wallet_basic/owner/:owner_type/:owner_identity", http.MethodPost)
assertRouteMethods(t, routes, "/heqi/platform/v1/wallet_apply_cash/:identity/approve", http.MethodPost)
assertRouteMethods(t, routes, "/heqi/platform/v1/wallet_apply_cash/:identity/reject", http.MethodPost)
assertRouteMethods(t, routes, "/heqi/platform/v1/wallet_apply_cash/:identity/complete", http.MethodPost)
for _, oldPath := range []string{
"/heqi/platform/v1/wallet/wallet",
"/heqi/platform/v1/wallet/wallet_ledger",