Update StatusService, fix json bug

This commit is contained in:
Daniel Supernault 2020-12-13 16:08:59 -07:00
parent 3a428366fb
commit 1ea2db74b2
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -2,9 +2,11 @@
namespace App\Services;
use Redis;
use Illuminate\Support\Facades\Redis;
use App\Status;
//use App\Transformer\Api\v3\StatusTransformer;
use App\Transformer\Api\StatusStatelessTransformer;
use App\Transformer\Api\StatusTransformer;
use League\Fractal;
use League\Fractal\Serializer\ArraySerializer;
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
@ -15,7 +17,7 @@ class StatusService {
public static function get($id)
{
return Redis::get(self::CACHE_KEY . $id) ?? self::coldGet($id);
return json_decode(Redis::get(self::CACHE_KEY . $id) ?? self::coldGet($id));
}
public static function coldGet($id)