Update AccountService, fix status bug

This commit is contained in:
Daniel Supernault 2021-09-04 21:12:44 -06:00
parent c3ffd5cbd6
commit 9e630851a3
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
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;
}