Rename notification.time

This commit is contained in:
Toby Zerner 2018-08-24 21:40:33 +09:30
parent 4b931470ed
commit 3a21b44a71
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ export default class Notification extends Component {
{avatar(notification.sender())} {avatar(notification.sender())}
{icon(this.icon(), {className: 'Notification-icon'})} {icon(this.icon(), {className: 'Notification-icon'})}
<span className="Notification-content">{this.content()}</span> <span className="Notification-content">{this.content()}</span>
{humanTime(notification.time())} {humanTime(notification.createdAt())}
<div className="Notification-excerpt"> <div className="Notification-excerpt">
{this.excerpt()} {this.excerpt()}
</div> </div>

View File

@ -47,7 +47,7 @@ class NotificationSerializer extends AbstractSerializer
'id' => (int) $notification->id, 'id' => (int) $notification->id,
'contentType' => $notification->type, 'contentType' => $notification->type,
'content' => $notification->data, 'content' => $notification->data,
'time' => $this->formatDate($notification->created_at), 'createdAt' => $this->formatDate($notification->created_at),
'isRead' => (bool) $notification->read_at 'isRead' => (bool) $notification->read_at
]; ];
} }