From ad33638a991158df856c970f67c59b134cc44263 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Fri, 24 Aug 2018 21:47:57 +0930 Subject: [PATCH] Fix up Notification model --- framework/core/js/src/common/models/Notification.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/framework/core/js/src/common/models/Notification.js b/framework/core/js/src/common/models/Notification.js index ad6cff6db..b324addcd 100644 --- a/framework/core/js/src/common/models/Notification.js +++ b/framework/core/js/src/common/models/Notification.js @@ -1,17 +1,13 @@ import Model from '../Model'; -import computed from '../utils/computed'; export default class Notification extends Model {} Object.assign(Notification.prototype, { contentType: Model.attribute('contentType'), - subjectId: Model.attribute('subjectId'), content: Model.attribute('content'), - time: Model.attribute('time', Model.date), + createdAt: Model.attribute('createdAt', Model.transformDate), isRead: Model.attribute('isRead'), - unreadCount: Model.attribute('unreadCount'), - additionalUnreadCount: computed('unreadCount', unreadCount => Math.max(0, unreadCount - 1)), user: Model.hasOne('user'), fromUser: Model.hasOne('fromUser'),