Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a03a263

Browse files
authored
Merge pull request #18 from codej99/feature/board
게시판 업데이트 수정 - 변경감지 기능 이용
2 parents 0bf89cc + c6110eb commit a03a263

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

‎src/main/java/com/rest/api/model/board/ParamsPost.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
import lombok.NoArgsConstructor;
66
import lombok.Setter;
77

8-
import javax.validation.constraints.Max;
98
import javax.validation.constraints.NotEmpty;
9+
import javax.validation.constraints.Size;
1010

1111
@Getter
1212
@Setter
1313
@NoArgsConstructor
1414
public class ParamsPost {
1515
@NotEmpty
16-
@Max(50)
16+
@Size(min = 2, max = 50)
1717
@ApiModelProperty(value = "작성자명", required = true)
1818
private String author;
1919
@NotEmpty
20-
@Max(100)
20+
@Size(min = 2, max = 100)
2121
@ApiModelProperty(value = "제목", required = true)
2222
private String title;
23-
@Max(500)
23+
@Size(min = 2, max = 500)
2424
@ApiModelProperty(value = "내용", required = true)
2525
private String content;
2626
}

‎src/main/java/com/rest/api/service/board/BoardService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public Post updatePost(long postId, String uid, ParamsPost paramsPost) {
5656
throw new CNotOwnerException();
5757

5858
post.setUpdate(paramsPost.getAuthor(), paramsPost.getTitle(), paramsPost.getContent());
59-
return postJpaRepo.save(post);
59+
return post;
6060
}
6161

6262
// 게시물을 삭제합니다. 게시물 등록자와 로그인 회원정보가 틀리면 CNotOwnerException 처리합니다.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.rest.api.controller.v1.board;
2+
3+
public class BoardControllerTest {
4+
5+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /