File tree Expand file tree Collapse file tree
src/main/java/everTale/everTale_be/domain/story Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,12 +26,12 @@ public class StoryController {
2626 private final StoryService storyService ;
2727
2828 @ Operation (summary = "단일 Scene 조회 API" , description = "스토리 ID와 씬 번호를 기반으로 해당 씬의 내용을 조회합니다." )
29- @ GetMapping ("/{storyId}/scenes/{sceneNum }" )
29+ @ GetMapping ("/{storyId}/scenes/{pageNum }" )
3030 public ApiResponse <SceneResponseDTO > getSceneBySceneNum (
3131 @ Parameter (description = "스토리 ID" ) @ PathVariable Long storyId ,
32- @ Parameter (description = "장면 번호" ) @ PathVariable int sceneNum
32+ @ Parameter (description = "장면 번호" ) @ PathVariable int pageNum
3333 ) {
34- SceneResponseDTO scene = storyService .getSceneBySceneNum (storyId , sceneNum );
34+ SceneResponseDTO scene = storyService .getSceneBySceneNum (storyId , pageNum );
3535 return ApiResponse .onSuccess (scene );
3636 }
3737
Original file line number Diff line number Diff line change 77@ Getter
88@ Builder
99public class SceneResponseDTO {
10- private int sceneNum ;
10+ private int pageNum ;
11+ private Long sceneId ;
1112 private String content ;
1213 private String imageUrl ;
1314
1415 public static SceneResponseDTO from (Scene scene ) {
1516 return SceneResponseDTO .builder ()
16- .sceneNum (scene .getPage ())
17+ .pageNum (scene .getPage ())
18+ .sceneId (scene .getId ())
1719 .content (scene .getContent ())
1820 .imageUrl (scene .getImageUrl ())
1921 .build ();
Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ public class StoryService {
4949
5050 // Scene 단일 조회
5151 @ Transactional (readOnly = true )
52- public SceneResponseDTO getSceneBySceneNum (Long storyId , int sceneNum ) {
53- Scene scene = sceneRepository .findByStoryIdAndPage (storyId , sceneNum )
52+ public SceneResponseDTO getSceneBySceneNum (Long storyId , int pageNum ) {
53+ Scene scene = sceneRepository .findByStoryIdAndPage (storyId , pageNum )
5454 .orElseThrow (() -> new NotFoundHandler (ErrorStatus .SCENE_NOT_FOUND ));
5555 return SceneResponseDTO .from (scene );
5656 }
You can’t perform that action at this time.
0 commit comments