Skip to content

Commit

Permalink
🥕Feat #25: [가계부 공유] 게시글 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
DDonghyeo committed Jul 23, 2023
1 parent f1da149 commit 66af4e8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,15 @@ public ResponseEntity<?> updateBoard(@PathVariable("accountBookId") int board_id
return new ResponseEntity<>(HttpStatus.OK);
}

/*
* [가계부 공유] 게시글 삭제
*
* @PathVariable accountBookId
*/
@DeleteMapping("/{accountBookId}")
public ResponseEntity<?> deleteBoard(@PathVariable("accountBookId") int board_id) {
accountBookSharingService.deleteBoard(board_id);
return new ResponseEntity<>(HttpStatus.OK);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,10 @@ public interface AccountBookSharingService {
* [가계부 공유] 게시글 수정
*/
void updateBoard(long board_id, SharingDto.Request req);


/*
* [가계부 공유] 게시글 삭제
*/
void deleteBoard(long board_id);
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ public void updateBoard(long board_id, SharingDto.Request req) {
//TODO: Img Upload
}

/*
* [가계부 공유] 게시글 수정
*/
@Override
public void deleteBoard(long board_id) {
sharingBoardRepository.deleteById(board_id);
}




Expand Down

0 comments on commit 66af4e8

Please sign in to comment.