template-monorepo/internal/logic/auth/register_resume_logic.go

39 lines
902 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Code scaffolded by goctl. Safe to edit.
// goctl 1.10.1
package auth
import (
"context"
"gateway/internal/svc"
"gateway/internal/types"
"github.com/zeromicro/go-zero/core/logx"
)
type RegisterResumeLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
}
// 恢復未完成註冊(重新寄送 registration OTP
func NewRegisterResumeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RegisterResumeLogic {
return &RegisterResumeLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
}
}
func (l *RegisterResumeLogic) RegisterResume(req *types.RegisterResumeReq) (*types.RegisterData, error) {
if err := requireRegistrationDeps(l.svcCtx); err != nil {
return nil, err
}
if req == nil {
return nil, errb.InputMissingRequired("request body is required")
}
return resumeRegistration(l.ctx, l.svcCtx, req.TenantSlug, req.Email)
}