From 9bab7cdffca1367c2845c2f0e825bc027dbc6ca3 Mon Sep 17 00:00:00 2001 From: dyhj625 Date: Tue, 18 Feb 2025 10:05:25 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=8C=EC=8B=9C=ED=8C=90=20=EC=9C=A0?= =?UTF-8?q?=EC=A0=80=EC=95=84=EC=9D=B4=EB=94=94=EA=B0=92=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/api/BoardController.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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");