This commit is contained in:
Pig Fang 2021-12-12 18:13:39 +08:00
parent faea0126ea
commit efa20f4940
No known key found for this signature in database
GPG Key ID: A8198F548DADA9E2
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ class NotificationsController extends Controller
return [
'title' => $notification->data['title'],
'content' => $converter->convertToHtml($notification->data['content'] ?? ''),
'content' => $converter->convertToHtml($notification->data['content'] ?? '')->getContent(),
'time' => $notification->created_at->toDateTimeString(),
];
}

View File

@ -119,7 +119,7 @@ class NotificationsControllerTest extends TestCase
$this->postJson('/user/notifications/'.$notification->id)
->assertJson([
'title' => $notification->data['title'],
'content' => $converter->convertToHtml($notification->data['content']),
'content' => $converter->convertToHtml($notification->data['content'])->getContent(),
'time' => $notification->created_at->toDateTimeString(),
]);
$notification->refresh();