chart.go 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package routers
  2. import (
  3. "github.com/gin-gonic/gin"
  4. "hongze/hongze_yb/controller/chart"
  5. "hongze/hongze_yb/middleware"
  6. )
  7. func InitChart(r *gin.Engine) {
  8. rGroup := r.Group("my_chart").Use(middleware.Token(), middleware.CheckChartAuth())
  9. {
  10. rGroup.GET("/getChartChassify", chart.GetMyChartChassify)
  11. rGroup.GET("/getChartList", chart.GetMyChartList)
  12. rGroup.POST("/moveMyChart", chart.MoveMyChart)
  13. rGroup.POST("/moveMyChartClassify", chart.MoveMyChartClassify)
  14. rGroup.GET("/getChartDetail", chart.GetChartInfoDetail)
  15. rGroup.POST("/editChartInfo", chart.EditChartInfo)
  16. rGroup.POST("/refreshChartInfo", chart.RefreshChartInfo)
  17. rGroup.GET("/getChartBeforeAndNext", chart.GetChartBeforeAndNext)
  18. rGroup.POST("/future_good/refreshChartInfo", chart.RefreshFutureGoodChartInfo)
  19. rGroup.POST("/correlation/refreshChartInfo", chart.RefreshCorrelationChartInfo)
  20. }
  21. initChart(r)
  22. }
  23. // initChart
  24. func initChart(r *gin.Engine) {
  25. rGroup := r.Group("api/my_chart").Use(middleware.Token(), middleware.CheckChartAuth())
  26. {
  27. rGroup.GET("/getChartChassify", chart.GetMyChartChassify)
  28. rGroup.GET("/getChartList", chart.GetMyChartList)
  29. rGroup.POST("/moveMyChart", chart.MoveMyChart)
  30. rGroup.POST("/moveMyChartClassify", chart.MoveMyChartClassify)
  31. rGroup.GET("/getChartDetail", chart.GetChartInfoDetail)
  32. rGroup.POST("/editChartInfo", chart.EditChartInfo)
  33. rGroup.POST("/refreshChartInfo", chart.RefreshChartInfo)
  34. rGroup.GET("/getChartBeforeAndNext", chart.GetChartBeforeAndNext)
  35. rGroup.POST("/future_good/refreshChartInfo", chart.RefreshFutureGoodChartInfo)
  36. rGroup.POST("/future_good/editChartInfo", chart.FutureGoodChartInfoSave)
  37. rGroup.POST("/correlation/refreshChartInfo", chart.RefreshCorrelationChartInfo)
  38. }
  39. }