Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
update SignupService.java
Browse files Browse the repository at this point in the history
subscribeOn 메서드 삭제
  • Loading branch information
ori0o0p committed Mar 20, 2024
1 parent 3a601a8 commit 3caeddc
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Scheduler;

@Service
public class SignupService implements SignupUsecase {
Expand All @@ -26,17 +25,15 @@ public class SignupService implements SignupUsecase {
private final GetAuthMailPort getAuthMailPort;
private final DeleteAuthMailPort deleteAuthMailPort;
private final PasswordEncoder passwordEncoder;
private final Scheduler scheduler;
private final GetMajorType getMajorType;
private final CreateDocumentUsecase createDocumentUsecase;
private final DefaultProfile defaultProfile;

public SignupService(GetUserPort getUserPort, SaveUserPort saveUserPort, GetAuthMailPort getAuthMailPort, DeleteAuthMailPort deleteAuthMailPort, PasswordEncoder passwordEncoder, Scheduler scheduler, GetMajorType getMajorType, CreateDocumentUsecase createDocumentUsecase, DefaultProfile defaultProfile) {
public SignupService(GetUserPort getUserPort, SaveUserPort saveUserPort, GetAuthMailPort getAuthMailPort, DeleteAuthMailPort deleteAuthMailPort, PasswordEncoder passwordEncoder, GetMajorType getMajorType, CreateDocumentUsecase createDocumentUsecase, DefaultProfile defaultProfile) {
this.getUserPort = getUserPort;
this.saveUserPort = saveUserPort;
this.getAuthMailPort = getAuthMailPort;
this.passwordEncoder = passwordEncoder;
this.scheduler = scheduler;
this.getMajorType = getMajorType;
this.deleteAuthMailPort = deleteAuthMailPort;
this.createDocumentUsecase = createDocumentUsecase;
Expand All @@ -62,7 +59,6 @@ private Mono<Void> checkAndCreateUser(SignupRequest request) {
.filter(verified -> verified)
.switchIfEmpty(Mono.error(UnVerifiedEmailException.EXCEPTION))
.map(verified -> passwordEncoder.encode(request.password()))
.subscribeOn(scheduler)
.flatMap(password -> createUser(request, password))
.flatMap(this::saveUserAndCreateDocument)
.then(deleteAuthMailPort.delete(request.email()))
Expand Down

0 comments on commit 3caeddc

Please sign in to comment.