mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-23 16:24:29 +00:00
Update ApiV1Controller
This commit is contained in:
parent
56256cb037
commit
51f8fe5bde
1 changed files with 9 additions and 7 deletions
|
@ -1435,6 +1435,7 @@ class ApiV1Controller extends Controller
|
|||
$limit = $request->input('limit') ?? 3;
|
||||
$user = $request->user();
|
||||
|
||||
if($user) {
|
||||
$key = 'user:last_active_at:id:'.$user->id;
|
||||
$ttl = now()->addMinutes(5);
|
||||
Cache::remember($key, $ttl, function() use($user) {
|
||||
|
@ -1442,6 +1443,7 @@ class ApiV1Controller extends Controller
|
|||
$user->save();
|
||||
return;
|
||||
});
|
||||
}
|
||||
|
||||
if($min || $max) {
|
||||
$dir = $min ? '>' : '<';
|
||||
|
|
Loading…
Reference in a new issue