routes.go 977 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. "git.i2edu.net/i2/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/users/share/jzQrcode",
  28. Handler: JzQrCodeHandler(serverCtx),
  29. },
  30. {
  31. Method: http.MethodPost,
  32. Path: "/api/users/bindMobile",
  33. Handler: BindMobileHandler(serverCtx),
  34. },
  35. {
  36. Method: http.MethodGet,
  37. Path: "/api/users/id/:userId",
  38. Handler: GetUserHandler(serverCtx),
  39. },
  40. },
  41. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  42. )
  43. }