게시판 유저아이디값 수정

This commit is contained in:
dyhj625 2025-02-18 10:05:25 +09:00
parent 59d193733c
commit 9bab7cdffc

View File

@ -80,8 +80,8 @@ public class BoardController {
@ParameterCheck
@PostMapping
public ApiResponse<BigInteger> 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<String> 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<String> 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<String> 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");