Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
OrdinaryJellyfish committed Nov 22, 2023
1 parent e0c085c commit b2374e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion extensions/flags/js/src/forum/components/FlagList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import type FlagListState from '../states/FlagListState';
import type Flag from '../models/Flag';
import { Page } from 'flarum/common/states/PaginatedListState';


export interface IFlagListAttrs extends ComponentAttrs {
state: FlagListState;
}
Expand Down
6 changes: 3 additions & 3 deletions extensions/flags/src/Api/Controller/ListFlagsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
use Flarum\Flags\Api\Serializer\FlagSerializer;
use Flarum\Flags\Flag;
use Flarum\Http\RequestUtil;
use Flarum\Http\UrlGenerator;
use Psr\Http\Message\ServerRequestInterface;
use Tobscure\JsonApi\Document;
use Flarum\Http\UrlGenerator;

class ListFlagsController extends AbstractListController
{
Expand Down Expand Up @@ -56,12 +56,12 @@ protected function data(ServerRequestInterface $request, Document $document): it
->orderBy('created_at', 'DESC')
->skip($offset)
->take($limit + 1);

$flags = Flag::whereVisibleTo($actor)
->joinSub($primaries, 'p', 'flags.id', '=', 'p.id')
->latest()
->get();

$this->loadRelations($flags, $include, $request);

$flags = $flags->all();
Expand Down

0 comments on commit b2374e8

Please sign in to comment.