Ver código fonte

Merge pull request #2909 from pixelfed/staging

Update AccountService, fix status bug
daniel 3 anos atrás
pai
commit
687030090f
2 arquivos alterados com 2 adições e 2 exclusões
  1. 1 1
      app/Services/AccountService.php
  2. 1 1
      app/Services/StatusService.php

+ 1 - 1
app/Services/AccountService.php

@@ -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();
 		});	

+ 1 - 1
app/Services/StatusService.php

@@ -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;
 	}