123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. package routers
  2. import (
  3. "github.com/astaxie/beego"
  4. "github.com/astaxie/beego/context/param"
  5. )
  6. func init() {
  7. beego.GlobalControllerRouter["annual-lottery/controllers:BaseController"] = append(beego.GlobalControllerRouter["annual-lottery/controllers:BaseController"],
  8. beego.ControllerComments{
  9. Method: "UploadFile",
  10. Router: `/file`,
  11. AllowHTTPMethods: []string{"post"},
  12. MethodParams: param.Make(),
  13. Params: nil})
  14. beego.GlobalControllerRouter["annual-lottery/controllers:LotteryController"] = append(beego.GlobalControllerRouter["annual-lottery/controllers:LotteryController"],
  15. beego.ControllerComments{
  16. Method: "Draw",
  17. Router: `/draw`,
  18. AllowHTTPMethods: []string{"post"},
  19. MethodParams: param.Make(),
  20. Params: nil})
  21. beego.GlobalControllerRouter["annual-lottery/controllers:LotteryController"] = append(beego.GlobalControllerRouter["annual-lottery/controllers:LotteryController"],
  22. beego.ControllerComments{
  23. Method: "ExportWinners",
  24. Router: `/excel/winner`,
  25. AllowHTTPMethods: []string{"get"},
  26. MethodParams: param.Make(),
  27. Params: nil})
  28. beego.GlobalControllerRouter["annual-lottery/controllers:LotteryController"] = append(beego.GlobalControllerRouter["annual-lottery/controllers:LotteryController"],
  29. beego.ControllerComments{
  30. Method: "PrizeList",
  31. Router: `/prize`,
  32. AllowHTTPMethods: []string{"get"},
  33. MethodParams: param.Make(),
  34. Params: nil})
  35. beego.GlobalControllerRouter["annual-lottery/controllers:LotteryController"] = append(beego.GlobalControllerRouter["annual-lottery/controllers:LotteryController"],
  36. beego.ControllerComments{
  37. Method: "PrizeEdit",
  38. Router: `/prize/?:id`,
  39. AllowHTTPMethods: []string{"post","put","delete"},
  40. MethodParams: param.Make(),
  41. Params: nil})
  42. beego.GlobalControllerRouter["annual-lottery/controllers:LotteryController"] = append(beego.GlobalControllerRouter["annual-lottery/controllers:LotteryController"],
  43. beego.ControllerComments{
  44. Method: "PrizeSettingList",
  45. Router: `/setting/prize`,
  46. AllowHTTPMethods: []string{"get"},
  47. MethodParams: param.Make(),
  48. Params: nil})
  49. beego.GlobalControllerRouter["annual-lottery/controllers:LotteryController"] = append(beego.GlobalControllerRouter["annual-lottery/controllers:LotteryController"],
  50. beego.ControllerComments{
  51. Method: "PrizeSetting",
  52. Router: `/setting/prize/?:id`,
  53. AllowHTTPMethods: []string{"post","put","delete"},
  54. MethodParams: param.Make(),
  55. Params: nil})
  56. beego.GlobalControllerRouter["annual-lottery/controllers:LotteryController"] = append(beego.GlobalControllerRouter["annual-lottery/controllers:LotteryController"],
  57. beego.ControllerComments{
  58. Method: "UserList",
  59. Router: `/user`,
  60. AllowHTTPMethods: []string{"get"},
  61. MethodParams: param.Make(),
  62. Params: nil})
  63. beego.GlobalControllerRouter["annual-lottery/controllers:LotteryController"] = append(beego.GlobalControllerRouter["annual-lottery/controllers:LotteryController"],
  64. beego.ControllerComments{
  65. Method: "WinnerList",
  66. Router: `/winner`,
  67. AllowHTTPMethods: []string{"get"},
  68. MethodParams: param.Make(),
  69. Params: nil})
  70. beego.GlobalControllerRouter["annual-lottery/controllers:LotteryController"] = append(beego.GlobalControllerRouter["annual-lottery/controllers:LotteryController"],
  71. beego.ControllerComments{
  72. Method: "CancelWinner",
  73. Router: `/winner/:uid`,
  74. AllowHTTPMethods: []string{"delete"},
  75. MethodParams: param.Make(),
  76. Params: nil})
  77. }