From 5c0c2d1c40613fbd85d2ec326995b6c211633ca9 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Fri, 24 Aug 2018 21:40:33 +0930 Subject: [PATCH] Rename notification.time --- js/src/forum/components/Notification.js | 2 +- src/Api/Serializer/NotificationSerializer.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/src/forum/components/Notification.js b/js/src/forum/components/Notification.js index 0af3f9fec..37448b262 100644 --- a/js/src/forum/components/Notification.js +++ b/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/src/Api/Serializer/NotificationSerializer.php b/src/Api/Serializer/NotificationSerializer.php index 03a8d898a..bf45c87ce 100644 --- a/src/Api/Serializer/NotificationSerializer.php +++ b/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 ]; }