mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-25 07:45:22 +00:00
commit
3d2ac8bce9
3 changed files with 6 additions and 10 deletions
|
@ -23,6 +23,7 @@
|
|||
- Updated public timeline api, use cached sorted set and client side block/mute filtering. ([37abcf38](https://github.com/pixelfed/pixelfed/commit/37abcf38))
|
||||
- Updated public timeline api, add experimental cache. ([192553ff](https://github.com/pixelfed/pixelfed/commit/192553ff))
|
||||
- Updated dark mode styles, fix black box on stories. Closes #2982. ([3169f68e](https://github.com/pixelfed/pixelfed/commit/3169f68e))
|
||||
- Updated verify_credentials api endpoint to improve performance. ([7df3540b](https://github.com/pixelfed/pixelfed/commit/7df3540b))
|
||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||
|
||||
## [v0.11.1 (2021-09-07)](https://github.com/pixelfed/pixelfed/compare/v0.11.0...v0.11.1)
|
||||
|
|
|
@ -122,6 +122,9 @@ class ApiV1Controller extends Controller
|
|||
public function verifyCredentials(Request $request)
|
||||
{
|
||||
abort_if(!$request->user(), 403);
|
||||
|
||||
abort_if($request->user()->status != null, 403);
|
||||
|
||||
$id = $request->user()->profile_id;
|
||||
|
||||
$res = ProfileService::get($id);
|
||||
|
|
|
@ -236,17 +236,9 @@ class BaseApiController extends Controller
|
|||
abort_if(!$user, 403);
|
||||
if($user->status != null) {
|
||||
Auth::logout();
|
||||
return redirect('/login');
|
||||
abort(403);
|
||||
}
|
||||
$key = 'user:last_active_at:id:'.$user->id;
|
||||
$ttl = now()->addMinutes(5);
|
||||
Cache::remember($key, $ttl, function() use($user) {
|
||||
$user->last_active_at = now();
|
||||
$user->save();
|
||||
return;
|
||||
});
|
||||
$resource = new Fractal\Resource\Item($user->profile, new AccountTransformer());
|
||||
$res = $this->fractal->createData($resource)->toArray();
|
||||
$res = AccountService::get($user->profile_id);
|
||||
return response()->json($res);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue