diff --git a/src/Listeners/AddApiAttributes.php b/src/Listeners/AddApiAttributes.php deleted file mode 100644 index 60fdd07..0000000 --- a/src/Listeners/AddApiAttributes.php +++ /dev/null @@ -1,27 +0,0 @@ -frontpage; - $attributes['frontdate'] = $serializer->formatDate($discussion->frontdate); - $attributes['front'] = (bool) $serializer->getActor()->can('front', $discussion); - - return $attributes; - } -} diff --git a/src/Listeners/SaveFrontToDatabase.php b/src/Listeners/SaveFrontToDatabase.php deleted file mode 100644 index db6f691..0000000 --- a/src/Listeners/SaveFrontToDatabase.php +++ /dev/null @@ -1,34 +0,0 @@ -data['attributes']['frontpage'])) { - $front = (bool) $event->data['attributes']['frontpage']; - $discussion = $event->discussion; - $actor = $event->actor; - $actor->assertCan('front', $discussion); - if ((bool) $discussion->frontpage === $front) { - return; - } - $discussion->frontdate = Carbon::now(); - - $discussion->frontpage = $front; - } - } -}