Skip to content

Commit 2df0179

Browse files
committed
skip sendVerificationMail for mock
1 parent 94879db commit 2df0179

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

account/accountusecase/accountinteractor/user_signup.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,10 @@ func (i *User) Signup(ctx context.Context, param accountinterfaces.SignupParam)
9898
return nil, err
9999
}
100100

101-
if err := i.sendVerificationMail(ctx, u, vr); err != nil {
102-
return nil, err
101+
if !param.MockAuth {
102+
if err := i.sendVerificationMail(ctx, u, vr); err != nil {
103+
return nil, err
104+
}
103105
}
104106

105107
return u, nil

account/accountusecase/accountinterfaces/user.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ type SignupParam struct {
4848
Theme *user.Theme
4949
UserID *user.ID
5050
WorkspaceID *workspace.ID
51+
MockAuth bool
5152
}
5253

5354
type UserFindOrCreateParam struct {

0 commit comments

Comments
 (0)