feat(platform): improve admin data workflows
This commit is contained in:
@@ -56,7 +56,6 @@ func registerGasRoute(group *gin.RouterGroup) {
|
||||
basic.GET("/:identity", gas.GetGasBasic)
|
||||
basic.PUT("/:identity", gas.UpdateGasBasic)
|
||||
basic.PATCH("/:identity/status", gas.UpdateGasBasicStatus)
|
||||
basic.POST("/:identity/review", gas.ReviewGasBasic)
|
||||
basic.DELETE("/:identity", func(ctx *gin.Context) { common.ArchiveRecord(ctx, &models.GasBasic{}) })
|
||||
registerWritableResource(group, "/gas_account", gas.ListGasAccount, gas.CreateGasAccount, gas.GetGasAccount, gas.UpdateGasAccount, &models.GasAccount{})
|
||||
}
|
||||
|
||||
@@ -63,16 +63,15 @@ func TestPlatformGasRouteUsesGasBasic(t *testing.T) {
|
||||
t.Fatal("gas_basic list route is not registered")
|
||||
}
|
||||
|
||||
func TestPlatformGasRouteExposesReview(t *testing.T) {
|
||||
func TestPlatformGasRouteDoesNotExposeReview(t *testing.T) {
|
||||
engine := gin.New()
|
||||
RegisterPlatform("heqi", engine)
|
||||
|
||||
for _, route := range engine.Routes() {
|
||||
if route.Method == http.MethodPost && route.Path == "/heqi/platform/v1/gas_basic/:identity/review" {
|
||||
return
|
||||
t.Fatal("gas_basic review route must not be registered")
|
||||
}
|
||||
}
|
||||
t.Fatal("gas_basic review route is not registered")
|
||||
}
|
||||
|
||||
func TestPlatformOrganizationAndAccountRoutesExposeResourceCRUD(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user