d
This commit is contained in:
parent
331b5d53f5
commit
bb886bf0cf
@ -234,7 +234,16 @@ public class BoardController {
|
|||||||
@ParameterCheck
|
@ParameterCheck
|
||||||
@PostMapping("/{boardId}/password")
|
@PostMapping("/{boardId}/password")
|
||||||
public ApiResponse<Boolean> checkBoardPassword(@ReqMap MapDto map) {
|
public ApiResponse<Boolean> checkBoardPassword(@ReqMap MapDto map) {
|
||||||
int boardId = Integer.parseInt(map.getString("LOCBRDSEQ"));
|
// boardId 데이터 타입 변환
|
||||||
|
Object boardIdObj = map.get("LOCBRDSEQ");
|
||||||
|
int boardId = 0;
|
||||||
|
|
||||||
|
if (boardIdObj instanceof Integer) {
|
||||||
|
boardId = (Integer) boardIdObj;
|
||||||
|
} else if (boardIdObj instanceof String) {
|
||||||
|
boardId = Integer.parseInt((String) boardIdObj);
|
||||||
|
}
|
||||||
|
|
||||||
String rawPassword = map.getString("LOCBRDPWD");
|
String rawPassword = map.getString("LOCBRDPWD");
|
||||||
|
|
||||||
String storedHashedPassword = boardService.getBoardPassword(boardId);
|
String storedHashedPassword = boardService.getBoardPassword(boardId);
|
||||||
@ -259,7 +268,15 @@ public class BoardController {
|
|||||||
@ParameterCheck
|
@ParameterCheck
|
||||||
@PostMapping("/comment/{commentId}/password")
|
@PostMapping("/comment/{commentId}/password")
|
||||||
public ApiResponse<Boolean> checkCommentPassword(@ReqMap MapDto map) {
|
public ApiResponse<Boolean> checkCommentPassword(@ReqMap MapDto map) {
|
||||||
int commentId = Integer.parseInt(map.getString("LOCCMTSEQ"));
|
// commentId 데이터 타입 변환
|
||||||
|
Object commentIdObj = map.get("LOCCMTSEQ");
|
||||||
|
int commentId = 0;
|
||||||
|
|
||||||
|
if (commentIdObj instanceof Integer) {
|
||||||
|
commentId = (Integer) commentIdObj;
|
||||||
|
} else if (commentIdObj instanceof String) {
|
||||||
|
commentId = Integer.parseInt((String) commentIdObj);
|
||||||
|
}
|
||||||
String rawPassword = map.getString("LOCCMTPWD");
|
String rawPassword = map.getString("LOCCMTPWD");
|
||||||
|
|
||||||
String storedHashedPassword = boardService.getCommentPassword(commentId);
|
String storedHashedPassword = boardService.getCommentPassword(commentId);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user