Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland committed Feb 20, 2024
1 parent ea9b390 commit 0bdbbbd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 59 deletions.
3 changes: 1 addition & 2 deletions extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
use Flarum\Post\Post;
use Flarum\Settings\Event\Saved as SettingsSaved;
use FoF\Polls\Api\Controllers;
use FoF\Polls\Api\Serializers\PollSerializer;

return [
(new Extend\Frontend('forum'))
Expand Down Expand Up @@ -57,7 +56,7 @@
->attributes(Api\AddDiscussionAttributes::class),

(new Extend\ApiSerializer(PostSerializer::class))
->hasMany('polls', PollSerializer::class)
->hasMany('polls', Api\Serializers\PollSerializer::class)
->attributes(Api\AddPostAttributes::class),

(new Extend\ApiSerializer(ForumSerializer::class))
Expand Down
55 changes: 0 additions & 55 deletions js/src/common/models/Poll.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion js/src/forum/addNavItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import LinkButton from 'flarum/common/components/LinkButton';
export default function addNavItem() {
extend(IndexPage.prototype, 'navItems', (items) => {
items.add(
'fof-polls-directory',
'fof-polls-list',
LinkButton.component(
{
href: app.route('fof_polls_list'),
Expand Down
4 changes: 3 additions & 1 deletion js/src/forum/extend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import PollsPage from './components/PollsPage';
import ComposePollPage from './components/ComposePollPage';

export default [
new Extend.Routes().add('fof_polls_list', '/polls', PollsPage).add('fof_polls_compose', '/polls/composer', ComposePollPage),
new Extend.Routes() //
.add('fof_polls_list', '/polls', PollsPage)
.add('fof_polls_compose', '/polls/composer', ComposePollPage),

new Extend.Store() //
.add('polls', Poll)
Expand Down

0 comments on commit 0bdbbbd

Please sign in to comment.