read comment notification working

This commit is contained in:
isUnknown 2025-01-10 17:40:45 +01:00
parent 9222069ef5
commit 246d21f85a
17 changed files with 86 additions and 111 deletions

View file

@ -109,7 +109,7 @@ const getStatus = computed(() => {
const correspondingNotification = userStore.notifications.find(
(notification) => notification.id === comment.id
);
if (correspondingNotification && correspondingNotification.isread != "true") {
if (correspondingNotification && !correspondingNotification.isRead) {
return "unread";
}
return undefined;
@ -143,7 +143,7 @@ function handleClick() {
async function read() {
if (getStatus.value !== "unread") return;
try {
const newNotification = await api.readNotification(comment.id);
const newNotification = await api.readNotification(comment);
console.log(newNotification);
userStore.readNotification(comment.id);
} catch (error) {