Merge pull request #1712 from pixelfed/staging

Update SiteController
This commit is contained in:
daniel 2019-09-24 00:54:53 -06:00 committed by GitHub
commit ca839e68d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -79,19 +79,19 @@ class SiteController extends Controller
public function privacy(Request $request) public function privacy(Request $request)
{ {
return Cache::remember('site:privacy', now()->addDays(120), function() { $page = Cache::remember('site:privacy', now()->addDays(120), function() {
$slug = '/site/privacy'; $slug = '/site/privacy';
$page = Page::whereSlug($slug)->whereActive(true)->first(); $page = Page::whereSlug($slug)->whereActive(true)->first();
return View::make('site.privacy')->with(compact('page'))->render();
}); });
return View::make('site.privacy')->with(compact('page'))->render();
} }
public function terms(Request $request) public function terms(Request $request)
{ {
return Cache::remember('site:terms', now()->addDays(120), function() { $page = Cache::remember('site:terms', now()->addDays(120), function() {
$slug = '/site/terms'; $slug = '/site/terms';
$page = Page::whereSlug($slug)->whereActive(true)->first(); return Page::whereSlug($slug)->whereActive(true)->first();
return View::make('site.terms')->with(compact('page'))->render();
}); });
return View::make('site.terms')->with(compact('page'))->render();
} }
} }