device_genre.go 801 B

1234567891011121314151617181920212223
  1. package admin
  2. import (
  3. "github.com/gin-gonic/gin"
  4. v1 "server/api/v1"
  5. "server/middleware"
  6. )
  7. type DeviceGenreRouter struct{}
  8. func (dgr *DeviceGenreRouter) InitDeviceGenreRouter(Router *gin.RouterGroup) {
  9. deviceGenreRouter := Router.Group("deviceGenre").Use(middleware.OperationRecord())
  10. deviceGenreRouterWithoutRecord := Router.Group("deviceGenre")
  11. deviceGenreRouterApi := v1.ApiGroupApp.AdminApiGroup.DeviceGenreApi
  12. {
  13. deviceGenreRouter.POST("createDeviceGenre", deviceGenreRouterApi.CreateDeviceGenre)
  14. deviceGenreRouter.PUT("updateDeviceGenre", deviceGenreRouterApi.UpdateDeviceGenre)
  15. deviceGenreRouter.DELETE("deleteDeviceGenre", deviceGenreRouterApi.DeleteDeviceGenre)
  16. }
  17. {
  18. deviceGenreRouterWithoutRecord.GET("queryAllDeviceGenres", deviceGenreRouterApi.QueryAllDeviceGenres)
  19. }
  20. }