From 3a21b44a71014f1596c2496d777fa2bd2b385c02 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Fri, 24 Aug 2018 21:40:33 +0930 Subject: [PATCH] Rename notification.time --- framework/core/js/src/forum/components/Notification.js | 2 +- framework/core/src/Api/Serializer/NotificationSerializer.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/core/js/src/forum/components/Notification.js b/framework/core/js/src/forum/components/Notification.js index 0af3f9fec..37448b262 100644 --- a/framework/core/js/src/forum/components/Notification.js +++ b/framework/core/js/src/forum/components/Notification.js @@ -29,7 +29,7 @@ export default class Notification extends Component { {avatar(notification.sender())} {icon(this.icon(), {className: 'Notification-icon'})} {this.content()} - {humanTime(notification.time())} + {humanTime(notification.createdAt())}
{this.excerpt()}
diff --git a/framework/core/src/Api/Serializer/NotificationSerializer.php b/framework/core/src/Api/Serializer/NotificationSerializer.php index 03a8d898a..bf45c87ce 100644 --- a/framework/core/src/Api/Serializer/NotificationSerializer.php +++ b/framework/core/src/Api/Serializer/NotificationSerializer.php @@ -47,7 +47,7 @@ class NotificationSerializer extends AbstractSerializer 'id' => (int) $notification->id, 'contentType' => $notification->type, 'content' => $notification->data, - 'time' => $this->formatDate($notification->created_at), + 'createdAt' => $this->formatDate($notification->created_at), 'isRead' => (bool) $notification->read_at ]; }