fusenapi/home-user-auth/internal/handler/routes.go
2023-06-05 17:56:55 +08:00

49 lines
953 B
Go

// Code generated by goctl. DO NOT EDIT.
package handler
import (
"net/http"
"fusenapi/home-user-auth/internal/svc"
"github.com/zeromicro/go-zero/rest"
)
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
[]rest.Route{
{
Method: http.MethodPost,
Path: "/user/login",
Handler: UserLoginHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/user/fonts",
Handler: UserFontsHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/user/get-type",
Handler: GetTypeHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/user/basic-info",
Handler: UserSaveBasicInfoHandler(serverCtx),
},
},
)
server.AddRoutes(
[]rest.Route{
{
Method: http.MethodGet,
Path: "/user/basic-info",
Handler: UserBasicInfoHandler(serverCtx),
},
},
rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
)
}