| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- // Code generated by goctl. DO NOT EDIT.
- package handler
- import (
- "net/http"
- acquirer "git.i2edu.net/i2/i2-bill-api/internal/handler/acquirer"
- auth "git.i2edu.net/i2/i2-bill-api/internal/handler/auth"
- part_time_user "git.i2edu.net/i2/i2-bill-api/internal/handler/part_time_user"
- user "git.i2edu.net/i2/i2-bill-api/internal/handler/user"
- "git.i2edu.net/i2/i2-bill-api/internal/svc"
- "git.i2edu.net/i2/go-zero/rest"
- )
- func RegisterHandlers(engine *rest.Server, serverCtx *svc.ServiceContext) {
- engine.AddRoutes(
- []rest.Route{
- {
- Method: http.MethodGet,
- Path: "/api/hello",
- Handler: auth.HelloHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/api/auth/loginByWeixin",
- Handler: auth.LoginByWeixinHandler(serverCtx),
- },
- },
- )
- engine.AddRoutes(
- []rest.Route{
- {
- Method: http.MethodGet,
- Path: "/api/user/share/jzQrcode",
- Handler: user.JzQrCodeHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/api/user/bindMobile",
- Handler: user.BindMobileHandler(serverCtx),
- },
- {
- Method: http.MethodGet,
- Path: "/api/user/info",
- Handler: user.GetUserHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/api/user/punchClock",
- Handler: user.PunchClockHandler(serverCtx),
- },
- },
- rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
- )
- engine.AddRoutes(
- []rest.Route{
- {
- Method: http.MethodPost,
- Path: "/api/v1/part_time_user/add",
- Handler: part_time_user.PartTimeUserAddHandler(serverCtx),
- },
- {
- Method: http.MethodPost,
- Path: "/api/v1/part_time_user/update",
- Handler: part_time_user.PartTimeUserUpdateHandler(serverCtx),
- },
- },
- rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
- )
- engine.AddRoutes(
- []rest.Route{
- {
- Method: http.MethodPost,
- Path: "/api/acquirer/enroll",
- Handler: acquirer.EnrollHandler(serverCtx),
- },
- },
- rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
- )
- }
|