mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
Update AccountService, fix status bug
This commit is contained in:
parent
c3ffd5cbd6
commit
9e630851a3
2 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ class AccountService
|
||||||
return Cache::remember($key, $ttl, function() use($id) {
|
return Cache::remember($key, $ttl, function() use($id) {
|
||||||
$fractal = new Fractal\Manager();
|
$fractal = new Fractal\Manager();
|
||||||
$fractal->setSerializer(new ArraySerializer());
|
$fractal->setSerializer(new ArraySerializer());
|
||||||
$profile = Profile::whereNull('status')->findOrFail($id);
|
$profile = Profile::findOrFail($id);
|
||||||
$resource = new Fractal\Resource\Item($profile, new AccountTransformer());
|
$resource = new Fractal\Resource\Item($profile, new AccountTransformer());
|
||||||
return $fractal->createData($resource)->toArray();
|
return $fractal->createData($resource)->toArray();
|
||||||
});
|
});
|
||||||
|
|
|
@ -18,7 +18,7 @@ class StatusService {
|
||||||
|
|
||||||
public static function key($id, $publicOnly = true)
|
public static function key($id, $publicOnly = true)
|
||||||
{
|
{
|
||||||
$p = $publicOnly ? '' : 'all:';
|
$p = $publicOnly ? 'pub:' : 'all:';
|
||||||
return self::CACHE_KEY . $p . $id;
|
return self::CACHE_KEY . $p . $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue