// Code generated by goctl. DO NOT EDIT.
// goctl 1.9.2

package handler

import (
	"net/http"

	email "juwan-backend/app/email/api/internal/handler/email"
	"juwan-backend/app/email/api/internal/svc"

	"github.com/zeromicro/go-zero/rest"
)

func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
	server.AddRoutes(
		rest.WithMiddlewares(
			[]rest.Middleware{serverCtx.Logger},
			[]rest.Route{
				{
					// 发送邮箱验证码
					Method:  http.MethodPost,
					Path:    "/verification-code/send",
					Handler: email.SendVerificationCodeHandler(serverCtx),
				},
			}...,
		),
		rest.WithPrefix("/api/v1/email"),
	)

	server.AddRoutes(
		[]rest.Route{
			{
				// 忘记密码-发送验证码
				Method:  http.MethodPost,
				Path:    "/forgot-password/send",
				Handler: email.ForgotPasswordHandler(serverCtx),
			},
		},
		rest.WithPrefix("/api/v1/auth"),
	)
}
