use BookStack\Actions\DispatchWebhookJob;
use BookStack\Actions\Webhook;
use BookStack\Auth\User;
-use BookStack\Entities\Models\Page;
use Illuminate\Http\Client\Request;
use Illuminate\Support\Facades\Bus;
use Illuminate\Support\Facades\Http;
'*' => Http::response('', 200),
]);
$webhook = $this->newWebhook(['active' => true, 'endpoint' => 'https://wh.example.com'], ['all']);
- /** @var Page $page */
- $page = Page::query()->first();
- $editor = $this->getEditor();
+ $page = $this->entities->page();
+ $editor = $this->users->editor();
$this->runEvent(ActivityType::PAGE_UPDATE, $page, $editor);
protected function runEvent(string $event, $detail = '', ?User $user = null)
{
if (is_null($user)) {
- $user = $this->getEditor();
+ $user = $this->users->editor();
}
$this->actingAs($user);