Skip to content

Commit

Permalink
🪓 :: student관련 기능 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
dkflfkd53 committed Dec 5, 2023
2 parents 04002e4 + 5e499e5 commit 2178a97
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.example.asterbackend.domain.user.auth.presentation.dto.request.LoginRequest;
import com.example.asterbackend.domain.user.auth.presentation.dto.response.TokenResponse;
import com.example.asterbackend.domain.user.schoolClass.facade.SchoolClassFacade;
import com.example.asterbackend.domain.user.student.repository.StudentRepository;
import com.example.asterbackend.domain.user.user.entity.User;
import com.example.asterbackend.domain.user.user.repository.UserRepository;
import com.example.asterbackend.global.exception.user.UserNotFoundException;
Expand All @@ -17,8 +16,6 @@ public class LoginService {

private final UserRepository userRepository;

private final StudentRepository studentRepository;

private final JwtTokenProvider jwtTokenProvider;

private final SchoolClassFacade schoolClassFacade;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
import com.example.asterbackend.domain.user.auth.presentation.dto.response.TokenResponse;
import com.example.asterbackend.domain.user.schoolClass.entity.SchoolClass;
import com.example.asterbackend.domain.user.schoolClass.facade.SchoolClassFacade;
import com.example.asterbackend.domain.user.student.repository.StudentRepository;
import com.example.asterbackend.domain.user.user.entity.User;
import com.example.asterbackend.domain.user.user.entity.type.Role;
import com.example.asterbackend.domain.user.user.repository.UserRepository;
import com.example.asterbackend.global.exception.user.NotStudentException;
import com.example.asterbackend.global.exception.user.UserExistsException;
import com.example.asterbackend.global.security.jwt.JwtTokenProvider;
import lombok.RequiredArgsConstructor;
Expand All @@ -21,18 +19,12 @@ public class SignupService {

private final UserRepository userRepository;

private final StudentRepository studentRepository;

private final JwtTokenProvider jwtTokenProvider;

private final SchoolClassFacade schoolClassFacade;

@Transactional
public TokenResponse signup(SignupRequest request) {
if(!studentRepository.findByStudentIdAndUsername(request.getStudentId(), request.getUsername()).isPresent()) {
throw NotStudentException.EXCEPTION;
}

if(userRepository.findByStudentId(request.getStudentId()).isPresent()) {
throw UserExistsException.EXCEPTION;
}
Expand All @@ -48,7 +40,6 @@ public TokenResponse signup(SignupRequest request) {
.profileImgUrl(request.getProfileImgUrl())
.build());

studentRepository.deleteByStudentId(request.getStudentId());
return jwtTokenProvider.receiveToken(request.getStudentId());
}

Expand Down

This file was deleted.

0 comments on commit 2178a97

Please sign in to comment.