mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-26 01:36:43 +00:00
Update BaseApiController
This commit is contained in:
parent
9886ec5954
commit
a24b4a40e0
1 changed files with 2 additions and 3 deletions
|
@ -48,8 +48,7 @@ class BaseApiController extends Controller
|
||||||
public function notifications(Request $request)
|
public function notifications(Request $request)
|
||||||
{
|
{
|
||||||
abort_if(!$request->user(), 403);
|
abort_if(!$request->user(), 403);
|
||||||
|
$pid = $request->user()->profile_id;
|
||||||
$pid = Auth::user()->profile->id;
|
|
||||||
$pg = $request->input('pg');
|
$pg = $request->input('pg');
|
||||||
if($pg == true) {
|
if($pg == true) {
|
||||||
$timeago = Carbon::now()->subMonths(6);
|
$timeago = Carbon::now()->subMonths(6);
|
||||||
|
@ -62,7 +61,7 @@ class BaseApiController extends Controller
|
||||||
} else {
|
} else {
|
||||||
$this->validate($request, [
|
$this->validate($request, [
|
||||||
'page' => 'nullable|integer|min:1|max:10',
|
'page' => 'nullable|integer|min:1|max:10',
|
||||||
'limit' => 'nullable|integer|min:1|max:10'
|
'limit' => 'nullable|integer|min:1|max:40'
|
||||||
]);
|
]);
|
||||||
$limit = $request->input('limit') ?? 10;
|
$limit = $request->input('limit') ?? 10;
|
||||||
$page = $request->input('page') ?? 1;
|
$page = $request->input('page') ?? 1;
|
||||||
|
|
Loading…
Reference in a new issue