Skip to content

Commit

Permalink
hotfix/fix bookshelf add and edit
Browse files Browse the repository at this point in the history
  • Loading branch information
momnpa333 committed Mar 10, 2023
1 parent 4d353b1 commit c9eabfe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,8 @@ public BookShelf save(@RequestBody BookShelf bookShelf){

@PostMapping("/edit")
@ResponseBody
public String edit(@RequestBody BookShelf bookShelf){
if (bookShelfService.validateDuplicateBookShelf(bookShelf)==-1){
return "id중복";
}
bookShelfService.save(bookShelf);
return "success";
public BookShelf edit(@RequestBody BookShelf bookShelf){
return bookShelfService.save(bookShelf);
}

}
1 change: 1 addition & 0 deletions src/main/java/KNU/Navibook/server/domain/BookShelf.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class BookShelf {

@Id
@Column(name = "BOOKSHELF_ID")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

private Long shelfFloor;
Expand Down

0 comments on commit c9eabfe

Please sign in to comment.