region.go 675 B

1234567891011121314151617181920212223
  1. package admin
  2. import (
  3. "github.com/gin-gonic/gin"
  4. v1 "server/api/v1"
  5. "server/middleware"
  6. )
  7. type RegionRouter struct{}
  8. func (rr *RegionRouter) InitRegionRouter(Router *gin.RouterGroup) {
  9. regionRouter := Router.Group("region").Use(middleware.OperationRecord())
  10. regionRouterWithoutRecord := Router.Group("region")
  11. regionRouterApi := v1.ApiGroupApp.AdminApiGroup.RegionApi
  12. {
  13. regionRouter.POST("createRegion", regionRouterApi.CreateRegion)
  14. regionRouter.PUT("updateRegion", regionRouterApi.UpdateRegion)
  15. regionRouter.DELETE("deleteRegion", regionRouterApi.DeleteRegion)
  16. }
  17. {
  18. regionRouterWithoutRecord.GET("queryAllRegions", regionRouterApi.QueryAllRegions)
  19. }
  20. }