1
0
Fork 0

Merge pull request #2909 from pixelfed/staging

Update AccountService, fix status bug
This commit is contained in:
daniel 2021-09-04 21:13:10 -06:00 committed by GitHub
commit 687030090f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ class AccountService
return Cache::remember($key, $ttl, function() use($id) {
$fractal = new Fractal\Manager();
$fractal->setSerializer(new ArraySerializer());
$profile = Profile::whereNull('status')->findOrFail($id);
$profile = Profile::findOrFail($id);
$resource = new Fractal\Resource\Item($profile, new AccountTransformer());
return $fractal->createData($resource)->toArray();
});

View File

@ -18,7 +18,7 @@ class StatusService {
public static function key($id, $publicOnly = true)
{
$p = $publicOnly ? '' : 'all:';
$p = $publicOnly ? 'pub:' : 'all:';
return self::CACHE_KEY . $p . $id;
}