notification: fix widget toggle read status

This commit is contained in:
2021-12-29 23:09:26 +01:00
parent 9ddfd194be
commit 1576507f7e
2 changed files with 24 additions and 29 deletions

View File

@@ -23,14 +23,12 @@ export default {
methods: {
markAsUnread() {
makeFetch('POST', `/api/1.0/main/notification/${this.notificationId}/mark/unread`, []).then(response => {
console.log('marked as unread', this.notificationId);
this.$emit('markRead', { notificationId: this.notificationId });
})
},
markAsRead() {
makeFetch('POST', `/api/1.0/main/notification/${this.notificationId}/mark/read`, []).then(response => {
console.log('marked as read', this.notificationId);
this.$emit('markRead', { notificationId: this.notificationId });
this.$emit('markUnread', { notificationId: this.notificationId });
})
},
},