Skip to content

Commit

Permalink
1.2.0
Browse files Browse the repository at this point in the history
* jsx elements
* discussions filters
* trivago imports formatter
  • Loading branch information
Nearata committed Jan 29, 2023
1 parent 7d964d2 commit 3e88a22
Show file tree
Hide file tree
Showing 12 changed files with 724 additions and 144 deletions.
17 changes: 4 additions & 13 deletions extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

namespace Nearata\RelatedDiscussions;

use Flarum\Api\Controller\ShowDiscussionController;
use Flarum\Api\Serializer\DiscussionSerializer;
use Flarum\Discussion\Discussion;
use Flarum\Discussion\Filter\DiscussionFilterer;
use Flarum\Extend;
use Nearata\RelatedDiscussions\Api\Controller\RelatedDiscussionsData;
use Nearata\RelatedDiscussions\Discussion\Filter\RelatedDiscussionsFilter;
use Nearata\RelatedDiscussions\Listener\SettingsSavingListener;

return [
Expand All @@ -19,15 +17,8 @@

new Extend\Locales(__DIR__.'/locale'),

(new Extend\Model(Discussion::class))
->belongsToMany('nearataRelatedDiscussions', Discussion::class, 'nearata_related_discussions', 'discussion_id', 'related_discussion_id'),

(new Extend\ApiSerializer(DiscussionSerializer::class))
->hasMany('nearataRelatedDiscussions', DiscussionSerializer::class),

(new Extend\ApiController(ShowDiscussionController::class))
->addInclude(['nearataRelatedDiscussions', 'nearataRelatedDiscussions.user', 'nearataRelatedDiscussions.tags'])
->prepareDataForSerialization(RelatedDiscussionsData::class),
(new Extend\Filter(DiscussionFilterer::class))
->addFilter(RelatedDiscussionsFilter::class),

(new Extend\Settings)
->default('nearata-related-discussions.allow-guests', false)
Expand Down
2 changes: 1 addition & 1 deletion js/dist/admin.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/dist/forum.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3e88a22

Please sign in to comment.