Skip to content

Commit

Permalink
[fix] #37 script 조회 시 paragraph 개수 정보 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
kyungminlee-12 committed Feb 15, 2023
1 parent 2ddcb2d commit 120edcf
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ private static class Body {
private String title;
//private String type;
private String contents;
private int count;
private List<Paragraph> paragraphList;

private LocalDateTime createdDate;
Expand All @@ -45,6 +46,7 @@ public ResponseEntity<?> firstSuccess(Script script) {
.scriptId(script.getScriptId())
.title(script.getTitle())
.contents("no contents")
.count(0)
.createdDate(script.getCreatedDate())
.modifiedDate(script.getModifiedDate())
.build();
Expand All @@ -55,6 +57,7 @@ public ResponseEntity<?> successScript(Script script) {

List<Paragraph> paragraphList = new ArrayList<>();
paragraphList=script.getParagraphList();
int paragraph_length=paragraphList.size();

//Member script_member=memberRepository.getUser(script.getMemberId());

Expand All @@ -74,6 +77,7 @@ public ResponseEntity<?> successScript(Script script) {
.scriptId(script.getScriptId())
.title(script.getTitle())
.contents(firestScriptContent)
.count(paragraph_length)
.paragraphList(script.getParagraphList())
.createdDate(script.getCreatedDate())
.modifiedDate(script.getModifiedDate())
Expand Down

0 comments on commit 120edcf

Please sign in to comment.