Skip to content

Commit

Permalink
[BF] - fix api/v4/public/content/members/0/list.json
Browse files Browse the repository at this point in the history
yannrobin committed Jul 19, 2021
1 parent b71113b commit 052a71c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Http/Controllers/ContentController.php
Original file line number Diff line number Diff line change
@@ -100,6 +100,7 @@ public function public( string $page ): View
*/
public function members( int $priv, string $page )
{

// check privilege:
if( $priv !== User::AUTH_PUBLIC ) {
if( Auth::guest() || Auth::getUser()->privs() < $priv ) {
@@ -122,7 +123,7 @@ public function members( int $priv, string $page )
abort( 404, 'Requested page not found' );
}

$r = response()->view( $page, [ 'customers' => Customer::currentActive() ], 200 );
$r = response()->view( $page, [ 'customers' => Customer::currentActive()->get() ], 200 );

if( $format === 'json' ) {
$r->header( 'Content-Type', 'application/json' );

0 comments on commit 052a71c

Please sign in to comment.