🎉 init

This commit is contained in:
landaiqing
2024-11-12 17:00:16 +08:00
commit 97ca3fc7b0
80 changed files with 26877 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
// Code generated by goctl. DO NOT EDIT.
// goctl 1.7.3
package handler
import (
"net/http"
"time"
user "schisandra-album-cloud-microservices/app/auth/internal/handler/user"
"schisandra-album-cloud-microservices/app/auth/internal/svc"
"github.com/zeromicro/go-zero/rest"
)
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.I18nMiddleware, serverCtx.SecurityHeadersMiddleware},
[]rest.Route{
{
Method: http.MethodPost,
Path: "/login",
Handler: user.AccountLoginHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/phone_login",
Handler: user.PhoneLoginHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/reset_password",
Handler: user.ResetPasswordHandler(serverCtx),
},
}...,
),
rest.WithSignature(serverCtx.Config.Signature),
rest.WithPrefix("/api/auth/user"),
rest.WithTimeout(10000*time.Millisecond),
rest.WithMaxBytes(1048576),
)
}