콘솔삭제
This commit is contained in:
parent
4145fdc445
commit
00f632e607
@ -263,7 +263,8 @@ const handleUpdateReaction = async ({ boardId, commentId, isLike, isDislike }) =
|
||||
// console.log("갱신된 데이터:", updatedData);
|
||||
|
||||
} catch (error) {
|
||||
alert('반응을 업데이트하는 중 오류 발생');
|
||||
alert('오류가 발생했습니다.');
|
||||
// console.log('반응을 업데이트하는 중 오류가 발생했습니다.');
|
||||
}
|
||||
};
|
||||
|
||||
@ -285,7 +286,8 @@ const handleCommentReaction = async ({ boardId, commentId, isLike, isDislike })
|
||||
await fetchComments();
|
||||
|
||||
} catch (error) {
|
||||
alert('댓글 반응을 업데이트하는 중 오류 발생');
|
||||
alert('오류가 발생했습니다.');
|
||||
// console.log('댓글 반응을 업데이트하는 중 오류 발생');
|
||||
}
|
||||
};
|
||||
|
||||
@ -370,7 +372,8 @@ const fetchComments = async (page = 1) => {
|
||||
|
||||
|
||||
} catch (error) {
|
||||
console.log('댓글 목록 불러오기 오류:', error);
|
||||
alert('오류가 발생했습니다.');
|
||||
// alert('댓글 목록 불러오기 오류:', error);
|
||||
}
|
||||
};
|
||||
|
||||
@ -410,10 +413,12 @@ const handleCommentSubmit = async (data, isCheck) => {
|
||||
commentAlert.value = '';
|
||||
await fetchComments();
|
||||
} else {
|
||||
console.error('댓글 작성 실패:', response.data.message);
|
||||
// console.error('댓글 작성 실패:', response.data.message);
|
||||
alert("댓글 작성을 실패했습니다.")
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('댓글 작성 중 오류 발생:', error);
|
||||
// console.error('댓글 작성 중 오류 발생:', error);
|
||||
alert("오류가 발생했습니다.")
|
||||
}
|
||||
};
|
||||
|
||||
@ -430,19 +435,21 @@ const handleCommentReply = async (reply) => {
|
||||
|
||||
if (response.status === 200) {
|
||||
if (response.data.code === 200) { // 서버 응답 코드도 확인
|
||||
console.log('대댓글 작성 성공:', response.data);
|
||||
// console.log('대댓글 작성 성공:', response.data);
|
||||
await fetchComments(); // 댓글 목록 새로고침
|
||||
} else {
|
||||
console.log('대댓글 작성 실패 - 서버 응답:', response.data);
|
||||
alert('대댓글 작성에 실패했습니다.');
|
||||
// console.log('대댓글 작성 실패 - 서버 응답:', response.data);
|
||||
alert('대댓글 작성을 실패했습니다.');
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('대댓글 작성 중 오류 발생:', error);
|
||||
// console.error('대댓글 작성 중 오류 발생:', error);
|
||||
if (error.response) {
|
||||
console.error('서버 응답 에러:', error.response.data);
|
||||
// console.error('서버 응답 에러:', error.response.data);
|
||||
alert("오류가 발생했습니다.");
|
||||
}
|
||||
alert('대댓글 작성 중 오류가 발생했습니다.');
|
||||
alert("오류가 발생했습니다.");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -501,7 +508,8 @@ const editComment = (comment) => {
|
||||
toggleCommentPassword(comment, "edit");
|
||||
|
||||
} else {
|
||||
console.log("⛔ 다른 사용자 댓글 - 수정 불가");
|
||||
// console.log("다른 사용자 댓글 - 수정 불가");
|
||||
alert("수정이 불가능합니다");
|
||||
}
|
||||
}
|
||||
|
||||
@ -593,8 +601,8 @@ const submitPassword = async () => {
|
||||
// 댓글 삭제 (비밀번호 확인 후)
|
||||
const submitCommentPassword = async (comment, password) => {
|
||||
|
||||
console.log("비밀번호 :", password);
|
||||
console.log("댓글 ID:", comment.commentId);
|
||||
// console.log("비밀번호 :", password);
|
||||
// console.log("댓글 ID:", comment.commentId);
|
||||
|
||||
if (!password) {
|
||||
passwordCommentAlert.value = "비밀번호를 입력해주세요.";
|
||||
@ -602,12 +610,12 @@ const submitCommentPassword = async (comment, password) => {
|
||||
}
|
||||
|
||||
try {
|
||||
console.log('서버로 비밀번호 확인 요청')
|
||||
// console.log('서버로 비밀번호 확인 요청')
|
||||
const response = await axios.post(`board/comment/${comment.commentId}/password`, {
|
||||
LOCCMTPWD: password,
|
||||
LOCCMTSEQ: comment.commentId,
|
||||
});
|
||||
console.log("✅ 서버 응답 데이터:", response.data);
|
||||
// console.log("✅ 서버 응답 데이터:", response.data);
|
||||
|
||||
if (response.data.code === 200 && response.data.data === true) {
|
||||
passwordCommentAlert.value = "";
|
||||
@ -625,14 +633,14 @@ const submitCommentPassword = async (comment, password) => {
|
||||
}
|
||||
lastCommentClickedButton.value = null;
|
||||
} else {
|
||||
console.log("❌ 비밀번호가 틀림");
|
||||
// console.log("❌ 비밀번호가 틀림");
|
||||
passwordCommentAlert.value = "비밀번호가 일치하지 않습니다.";
|
||||
}
|
||||
} catch (error) {
|
||||
console.log("🚨 서버 요청 중 오류 발생:", error.response?.data || error);
|
||||
if (error.response?.status === 401) {
|
||||
console.log("❌ 401 오류: 인증 실패 (비밀번호 불일치)");
|
||||
}
|
||||
// console.log("🚨 서버 요청 중 오류 발생:", error.response?.data || error);
|
||||
// if (error.response?.status === 401) {
|
||||
// console.log("❌ 401 오류: 인증 실패 (비밀번호 불일치)");
|
||||
// }
|
||||
passwordCommentAlert.value = "비밀번호가 일치하지 않습니다";
|
||||
}
|
||||
};
|
||||
@ -681,7 +689,7 @@ const deleteReplyComment = async (comment) => {
|
||||
alert("댓글 삭제에 실패했습니다.");
|
||||
}
|
||||
} catch (error) {
|
||||
console.log("댓글 삭제 중 오류 발생:", error);
|
||||
// console.log("댓글 삭제 중 오류 발생:", error);
|
||||
alert("댓글 삭제 중 오류가 발생했습니다.");
|
||||
}
|
||||
};
|
||||
@ -704,13 +712,16 @@ const handleSubmitEdit = async (comment, editedContent) => {
|
||||
targetComment.content = editedContent; // 댓글 내용 업데이트
|
||||
targetComment.isEditTextarea = false; // 수정 모드 닫기
|
||||
} else {
|
||||
console.warn("❌ 수정할 댓글을 찾을 수 없음");
|
||||
// console.warn("❌ 수정할 댓글을 찾을 수 없음");
|
||||
alert("수정할 댓글을 찾을 수 없습니다.");
|
||||
}
|
||||
} else {
|
||||
console.log("❌ 댓글 수정 실패:", response.data);
|
||||
// console.log("❌ 댓글 수정 실패:", response.data);
|
||||
alert("댓글 수정 실패했습니다.");
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("댓글 수정 중 오류 발생:", error);
|
||||
// console.error("댓글 수정 중 오류 발생:", error);
|
||||
alert("댓글 수정 중 오류 발생했습니다.");
|
||||
}
|
||||
};
|
||||
|
||||
@ -719,10 +730,11 @@ const handleCancelEdit = (comment) => {
|
||||
const targetComment = findCommentById(comment.commentId, comments.value);
|
||||
|
||||
if (targetComment) {
|
||||
console.log("✅ 원본 데이터 찾음, 수정 취소 처리 가능:", targetComment);
|
||||
// console.log("✅ 원본 데이터 찾음, 수정 취소 처리 가능:", targetComment);
|
||||
targetComment.isEditTextarea = false;
|
||||
} else {
|
||||
console.error("❌ 원본 데이터 찾을 수 없음, 수정 취소 실패");
|
||||
// console.error("❌ 원본 데이터 찾을 수 없음, 수정 취소 실패");
|
||||
alert("수정 취소를 실패했습니다.");
|
||||
}
|
||||
};
|
||||
|
||||
@ -753,7 +765,7 @@ const handleCommentDeleted = (deletedCommentId) => {
|
||||
}
|
||||
}
|
||||
|
||||
console.error("❌ 삭제할 댓글을 찾을 수 없음:", deletedCommentId);
|
||||
// console.error("❌ 삭제할 댓글을 찾을 수 없음:", deletedCommentId);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user