routes.go 857 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. Method: http.MethodGet,
  23. Path: "/api/users/share/jz_qrcode",
  24. Handler: JzQrCodeHandler(serverCtx),
  25. },
  26. },
  27. )
  28. engine.AddRoutes(
  29. []rest.Route{
  30. {
  31. Method: http.MethodGet,
  32. Path: "/api/users/id/:userId",
  33. Handler: GetUserHandler(serverCtx),
  34. },
  35. },
  36. rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
  37. )
  38. }