You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
968 B
49 lines
968 B
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.8.4
|
|
|
|
package handler
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
health "backend/usercenter/api/internal/handler/health"
|
|
user "backend/usercenter/api/internal/handler/user"
|
|
"backend/usercenter/api/internal/svc"
|
|
|
|
"github.com/zeromicro/go-zero/rest"
|
|
)
|
|
|
|
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|
server.AddRoutes(
|
|
[]rest.Route{
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/ping",
|
|
Handler: health.UsercenterPingHandler(serverCtx),
|
|
},
|
|
},
|
|
)
|
|
|
|
server.AddRoutes(
|
|
[]rest.Route{
|
|
{
|
|
// 用户登录
|
|
Method: http.MethodPost,
|
|
Path: "/login",
|
|
Handler: user.UserLoginHandler(serverCtx),
|
|
},
|
|
{
|
|
// 用户登出
|
|
Method: http.MethodPost,
|
|
Path: "/logout",
|
|
Handler: user.UserLogoutHandler(serverCtx),
|
|
},
|
|
{
|
|
// 用户注册
|
|
Method: http.MethodPost,
|
|
Path: "/register",
|
|
Handler: user.UserRegisterHandler(serverCtx),
|
|
},
|
|
},
|
|
)
|
|
}
|
|
|