Skip to content

Commit 7122537

Browse files
chore(2.0): JSON:API changes
Flarum 2.0 completely changes the JSON:API implementation
1 parent b22067f commit 7122537

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

extend.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
use FoF\Webhooks\Adapters\Adapters;
1818
use FoF\Webhooks\Api\Serializer\WebhookSerializer;
1919
use FoF\Webhooks\Listener\TriggerListener;
20+
use Flarum\Api\Context;
21+
use Flarum\Api\Endpoint;
22+
use Flarum\Api\Resource;
23+
use Flarum\Api\Schema;
2024

2125
return [
2226
(new Extend\Frontend('admin'))
@@ -35,6 +39,7 @@
3539
->patch('/fof/webhooks/{id}', 'fof.webhooks.update', Api\Controller\UpdateWebhookController::class)
3640
->delete('/fof/webhooks/{id}', 'fof.webhooks.delete', Api\Controller\DeleteWebhookController::class),
3741

42+
// @TODO: Replace with the new implementation https://docs.flarum.org/2.x/extend/api#extending-api-resources
3843
(new Extend\ApiSerializer(ForumSerializer::class))
3944
->hasMany('webhooks', WebhookSerializer::class),
4045

0 commit comments

Comments
 (0)