1
0
Fork 0
forked from mirror/pixelfed

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

View file

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