Skip to content

Commit

Permalink
bug fix: 복습 리스트에 문제 존재 시 문제 삭제가 안 되는 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
KiSeungMin committed Nov 9, 2024
1 parent 2cfbf07 commit 3403a18
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public boolean validateToken(String token) {
JWTVerifier verifier = JWT.require(algorithm).build();
DecodedJWT jwt = verifier.verify(token);

log.info("jwt validate success");
//log.info("jwt validate success");
return true;
} catch (JWTVerificationException exception) {
log.warn("token validate failure : " + exception.getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public ResponseEntity<?> verifyAccessToken(@RequestHeader("Authorization") Strin
if (authorizationHeader != null && authorizationHeader.startsWith("Bearer ")) {
String accessToken = authorizationHeader.substring(7);
if (jwtTokenProvider.validateToken(accessToken)) {
log.info("success for verify access token");
//log.info("success for verify access token");
return ResponseEntity.ok("Token is valid");
} else {
log.warn("token is invalid");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ public void deleteProblem(Long userId, Long problemId) {
List<ProblemRepeat> problemRepeats = getProblemRepeats(problemId);
problemRepeatRepository.deleteAll(problemRepeats);

problemPracticeService.deleteProblemFromAllPractice(problemId);

problemRepository.delete(problem);
} else {
throw new UserNotAuthorizedException("문제 작성자와 유저가 불일치합니다!");
Expand Down

0 comments on commit 3403a18

Please sign in to comment.