Skip to content

Commit

Permalink
!hotfix: userdetail import
Browse files Browse the repository at this point in the history
  • Loading branch information
daeun084 committed Nov 17, 2024
1 parent f2b7539 commit 093a34e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/LearnMate/dev/service/DiaryService.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import LearnMate.dev.model.enums.EmotionSpectrum;
import LearnMate.dev.repository.DiaryRepository;
import LearnMate.dev.repository.UserRepository;
import LearnMate.dev.security.security.CustomUserDetails;
import lombok.RequiredArgsConstructor;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
Expand All @@ -42,6 +43,7 @@ public class DiaryService {
* @return
*/
public DiaryAnalysisResponse analyzeDiary(DiaryAnalysisRequest request) {
Long userId = getUserIdFromAuthentication();
User user = findUserById(userId);
validIsUserPostDiary(user);

Expand Down

0 comments on commit 093a34e

Please sign in to comment.