Skip to content

Commit

Permalink
Refactor: 로그인 활성화
Browse files Browse the repository at this point in the history
  • Loading branch information
qjvk2880 committed May 30, 2024
1 parent bc2c80c commit 3259dc6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private void setAuthentication(String accessToken) {
@Override
protected boolean shouldNotFilter(HttpServletRequest request) {
String path = request.getRequestURI();
return path.startsWith("/");
return path.startsWith("/api/auth");
}

private String parseBearerToken(HttpServletRequest request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public class CategoryService {
private final UserRepository userRepository;

public SubCategoryListResponse getSubCategoryList(MainCategory mainCategory, Long userId) {
User user = userRepository.getReferenceById(1L);
// User user = userRepository.getReferenceById(userId);
// User user = userRepository.getReferenceById(1L);
User user = userRepository.getReferenceById(userId);
List<SubCategoryResponse> subCategoryList = categoryRepository.findAllByMainCategoryAndUser(mainCategory, user);
return new SubCategoryListResponse(subCategoryList);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ public VideoSummaryInitiateResponse initiateSummarizing(VideoSummaryInitiateRequ

String videoCode = platform.name() + '_' + videoId;

userId = summaryInitiateRequest.getUserId();

if (checkDuplicateSummarizing(videoCode, userId)) {
throw new AppException(ErrorCode.ALREADY_REQUESTED_SUMMARIZING);
}
Expand Down Expand Up @@ -84,9 +82,9 @@ public VideoSummaryStatusResponse getStatus(String videoCode, Long userId) {
.orElseThrow(() -> new AppException(ErrorCode.SUMMARIZING_STATUS_NOT_EXIST));

if (statusCache.getStatus().equals(COMPLETE.name())) {
// Category category = categoryRepository.findDefaultCategoryByUserIdAndMainCategory(userId, statusCache.getGeneratedMainCategory()).get();
Category category = categoryRepository.findDefaultCategoryByUserIdAndMainCategory(1L, statusCache.getGeneratedMainCategory())
Category category = categoryRepository.findDefaultCategoryByUserIdAndMainCategory(userId, statusCache.getGeneratedMainCategory())
.orElseThrow(() -> new AppException(ErrorCode.CATEGORY_NOT_EXIST));
// Category category = categoryRepository.findDefaultCategoryByUserIdAndMainCategory(1L, statusCache.getGeneratedMainCategory())
VideoSummary videoSummary = videoSummaryRepository.getReferenceById(statusCache.getVideoSummaryId());

videoSummaryCategoryRepository.save(VideoSummaryCategory.builder()
Expand Down

0 comments on commit 3259dc6

Please sign in to comment.