Skip to content

Commit

Permalink
fixed: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
falstack committed Dec 18, 2019
1 parent 0f8fb32 commit aa0a11f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Http/Controllers/v1/IdolController.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function trend(Request $request)
public function fans(Request $request)
{
$slug = $request->get('slug');
$page = $request->get('page') ?: 0;
$page = $request->get('page') ?: 1;
$take = $request->get('take') ?: 15;
$sort = $request->get('sort') ?: 'news';
$idolRepository = new IdolRepository();
Expand All @@ -183,6 +183,7 @@ public function fans(Request $request)
return $this->resErrNotFound();
}

$page = $page - 1;
$idsObj = $sort === 'news'
? $idolRepository->idolNewsFans($slug, $page, $take)
: $idolRepository->idolHotFans($slug, $page, $take);
Expand Down

0 comments on commit aa0a11f

Please sign in to comment.