File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
src/main/java/learningFlow/learningFlow_BE Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -67,8 +67,9 @@ public Resource getResource(Long episodeId){
6767 }
6868
6969 @ Transactional
70- public Optional <Memo > getMemoContents (Long episodeId ){
71- return memoRepository .findByEpisodeId (episodeId );
70+ public Optional <Memo > getMemoContents (Long episodeId , String loginId ){
71+ MemoId memoId = new MemoId (episodeId , loginId );
72+ return memoRepository .findById (memoId );
7273 }
7374
7475 @ Transactional
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ public ApiResponse<ResourceResponseDTO.ResourceUrlDTO> watchEpisode(
7575 String loginId = principalDetails .getUser ().getLoginId ();
7676 UserEpisodeProgress userEpisodeProgress = resourceService .getUserEpisodeProgress (episodeId , loginId );
7777 Collection collection = resourceService .getCollection (episodeId );
78- Optional <Memo > memo = resourceService .getMemoContents (episodeId );
78+ Optional <Memo > memo = resourceService .getMemoContents (episodeId , loginId );
7979 Resource resource = youtubeUrlEmbedService .getResource (episodeId );
8080 List <UserEpisodeProgress > episodeProgress = resourceService .getEpisodeProgress (loginId , episodeId );
8181 ResourceResponseDTO .ResourceUrlDTO response =
@@ -115,7 +115,7 @@ public ApiResponse<ResourceResponseDTO.ResourceBlogUrlDTO> watchBlogEpisode(
115115 String loginId = principalDetails .getUser ().getLoginId ();
116116 UserEpisodeProgress userEpisodeProgress = resourceService .getUserEpisodeProgress (episodeId , loginId );
117117 Collection collection = resourceService .getCollection (episodeId );
118- Optional <Memo > memo = resourceService .getMemoContents (episodeId );
118+ Optional <Memo > memo = resourceService .getMemoContents (episodeId , loginId );
119119 String resourceTitle = resourceService .getResource (episodeId ).getTitle ();
120120 List <UserEpisodeProgress > episodeProgress = resourceService .getEpisodeProgress (loginId , episodeId );
121121 String blogSourceUrl = "/resources/" + episodeId + "/blog/content" ;
You can’t perform that action at this time.
0 commit comments