익명 댓글 수정 완료

This commit is contained in:
kimdaae328 2025-02-27 16:46:49 +09:00
parent e30dd8f7b0
commit 0968a616b6

View File

@ -599,6 +599,8 @@ const submitCommentPassword = async (comment, password) => {
return;
}
const targetComment = findCommentById(comment.commentId, comments.value);
try {
// console.log(' ')
const response = await axios.post(`board/comment/${comment.commentId}/password`, {
@ -612,10 +614,17 @@ const submitCommentPassword = async (comment, password) => {
comment.isCommentPassword = false;
if (lastCommentClickedButton.value === "edit") {
comment.isEditTextarea = true;
passwordCommentAlert.value = "";
// handleSubmitEdit(comment, comment.content);
if (targetComment) {
targetComment.isEditTextarea = true;
passwordCommentAlert.value = "";
} else {
alert("수정 취소를 실패했습니다.");
}
// !!!!!
} else if (lastCommentClickedButton.value === "delete") {
passwordCommentAlert.value = "";