refactor platform account and access models
This commit is contained in:
@@ -179,7 +179,13 @@ func registerUserRoute(group *gin.RouterGroup) {
|
||||
}
|
||||
|
||||
func registerPlatformRoute(group *gin.RouterGroup) {
|
||||
registerWritableResource(group, "/platfrom_account", platform.ListPlatfromAccount, platform.CreatePlatfromAccount, platform.GetPlatfromAccount, platform.UpdatePlatfromAccount, &models.PlatfromAccount{})
|
||||
account := group.Group("/platform_account")
|
||||
account.GET("", platform.ListPlatformAccount)
|
||||
account.POST("", platform.CreatePlatformAccount)
|
||||
account.GET("/:identity", platform.GetPlatformAccount)
|
||||
account.PUT("/:identity", platform.UpdatePlatformAccount)
|
||||
account.PATCH("/:identity/status", platform.UpdatePlatformAccountStatus)
|
||||
account.DELETE("/:identity", platform.ArchivePlatformAccount)
|
||||
role := group.Group("/platform_role")
|
||||
role.GET("", platform.ListPlatformRole)
|
||||
role.POST("", platform.CreatePlatformRole)
|
||||
@@ -189,7 +195,6 @@ func registerPlatformRoute(group *gin.RouterGroup) {
|
||||
role.DELETE("/:identity", platform.ArchivePlatformRole)
|
||||
role.GET("/:identity/menu", platform.ListPlatformRoleMenuIdentities)
|
||||
role.PUT("/:identity/menu", platform.ReplacePlatformRoleMenus)
|
||||
role.PUT("/:identity/menus", platform.ReplacePlatformRoleMenus)
|
||||
menu := group.Group("/platform_menu")
|
||||
menu.GET("", platform.ListPlatformMenu)
|
||||
menu.POST("", platform.CreatePlatformMenu)
|
||||
|
||||
Reference in New Issue
Block a user