Update ExportSettings controller

pull/1530/head
Daniel Supernault 2019-07-19 21:37:37 -06:00
rodzic 00eefa24eb
commit 796f8ca78c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -103,7 +103,7 @@ trait ExportSettings
$this->validate($request, [
'type' => 'required|string|in:ap,api'
]);
$limit = 300;
$limit = 500;
$profile = Auth::user()->profile;
$type = 'ap';
@ -116,7 +116,7 @@ trait ExportSettings
$filename = 'outbox.json';
if($type == 'ap') {
$data = Cache::remember('account:export:profile:statuses:ap:'.Auth::user()->profile->id, now()->addDays(7), function() {
$data = Cache::remember('account:export:profile:statuses:ap:'.Auth::user()->profile->id, now()->addHours(1), function() {
$profile = Auth::user()->profile->statuses;
$fractal = new Fractal\Manager();
$fractal->setSerializer(new ArraySerializer());
@ -125,7 +125,7 @@ trait ExportSettings
});
} else {
$filename = 'api-statuses.json';
$data = Cache::remember('account:export:profile:statuses:api:'.Auth::user()->profile->id, now()->addDays(7), function() {
$data = Cache::remember('account:export:profile:statuses:api:'.Auth::user()->profile->id, now()->addHours(1), function() {
$profile = Auth::user()->profile->statuses;
$fractal = new Fractal\Manager();
$fractal->setSerializer(new ArraySerializer());