routes.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Code generated by goctl. DO NOT EDIT.
  2. package handler
  3. import (
  4. "net/http"
  5. "git.i2edu.net/i2/i2-bill-api/internal/svc"
  6. "github.com/tal-tech/go-zero/rest"
  7. )
  8. func RegisterHandlers(engine *rest.Server, serverCtx *svc.ServiceContext) {
  9. engine.AddRoutes(
  10. []rest.Route{
  11. {
  12. Method: http.MethodGet,
  13. Path: "/api/hello",
  14. Handler: HelloHandler(serverCtx),
  15. },
  16. {
  17. Method: http.MethodPost,
  18. Path: "/api/auth/loginByWeixin",
  19. Handler: LoginByWeixinHandler(serverCtx),
  20. },
  21. },
  22. )
  23. engine.AddRoutes(
  24. []rest.Route{
  25. {
  26. Method: http.MethodGet,
  27. Path: "/api/user/share/jzQrcode",
  28. Handler: JzQrCodeHandler(serverCtx),
  29. },
  30. {
  31. Method: http.MethodPost,
  32. Path: "/api/user/bindMobile",
  33. Handler: BindMobileHandler(serverCtx),
  34. },
  35. {
  36. Method: http.MethodGet,
  37. Path: "/api/user/info",
  38. Handler: GetUserHandler(serverCtx),
  39. },
  40. {
  41. Method: http.MethodPost,
  42. Path: "/api/v1/part_time_user/add",
  43. Handler: PartTimeUserAdHandler(serverCtx),
  44. },
  45. },
  46. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  47. )
  48. }