diff --git a/src/main/java/io/company/localhost/controller/api/BoardController.java b/src/main/java/io/company/localhost/controller/api/BoardController.java index ca78e51..60e5d53 100644 --- a/src/main/java/io/company/localhost/controller/api/BoardController.java +++ b/src/main/java/io/company/localhost/controller/api/BoardController.java @@ -80,8 +80,8 @@ public class BoardController { @ParameterCheck @PostMapping public ApiResponse createBoard(@ReqMap MapDto map) { - //Long userId = AuthUtil.getUser().getId(); - map.put("MEMBERSEQ", 22); + Long userId = AuthUtil.getUser().getId(); + map.put("MEMBERSEQ", userId); if (map.containsKey("LOCBRDPWD") && !map.getString("LOCBRDPWD").trim().isEmpty()) { // 빈 값 체크 String rawPassword = map.getString("LOCBRDPWD"); @@ -143,8 +143,8 @@ public class BoardController { @ParameterCheck @PostMapping("/{CMNBRDSEQ}/attachments") public ApiResponse uploadAttachment(@ReqMap MapDto map) { - //Long userId = AuthUtil.getUser().getId(); - map.put("CMNFLEREG", 22); + Long userId = AuthUtil.getUser().getId(); + map.put("CMNFLEREG", userId); boardService.addAttachment(map); return ApiResponse.ok("첨부파일이 저장되었습니다."); } @@ -158,8 +158,8 @@ public class BoardController { @ParameterCheck @PostMapping("/{LOCBRDSEQ}/{LOCCMTSEQ}/reaction") public ApiResponse reactToBoard(@ReqMap MapDto map) { - //Long userId = AuthUtil.getUser().getId(); - map.put("MEMBERSEQ", 22); + Long userId = AuthUtil.getUser().getId(); + map.put("MEMBERSEQ", userId); boardService.reactToBoard(map); return ApiResponse.ok("반응이 성공적으로 처리되었습니다."); } @@ -186,8 +186,8 @@ public class BoardController { @ParameterCheck @PostMapping("/{LOCBRDSEQ}/comment") public ApiResponse addCommentOrReply(@ReqMap MapDto map) { - //Long userId = AuthUtil.getUser().getId(); - map.put("MEMBERSEQ", 22); + Long userId = AuthUtil.getUser().getId(); + map.put("MEMBERSEQ", userId); if (map.containsKey("LOCCMTPWD") && !map.getString("LOCCMTPWD").trim().isEmpty()) { // 빈 값 체크 String rawPassword = map.getString("LOCCMTPWD");