mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-23 13:00:46 +00:00
Update PageController
This commit is contained in:
parent
96a101e560
commit
7d2a6df9f9
1 changed files with 6 additions and 1 deletions
|
@ -18,6 +18,7 @@ class PageController extends Controller
|
|||
'/site/about' => 'site:about',
|
||||
'/site/privacy' => 'site:privacy',
|
||||
'/site/terms' => 'site:terms',
|
||||
'/site/kb/community-guidelines' => 'site:help:community-guidelines'
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -81,7 +82,7 @@ class PageController extends Controller
|
|||
public function generatePage(Request $request)
|
||||
{
|
||||
$this->validate($request, [
|
||||
'page' => 'required|string|in:about,terms,privacy',
|
||||
'page' => 'required|string|in:about,terms,privacy,community_guidelines',
|
||||
]);
|
||||
|
||||
$page = $request->input('page');
|
||||
|
@ -98,6 +99,10 @@ class PageController extends Controller
|
|||
case 'terms':
|
||||
Page::firstOrCreate(['slug' => '/site/terms']);
|
||||
break;
|
||||
|
||||
case 'community_guidelines':
|
||||
Page::firstOrCreate(['slug' => '/site/kb/community-guidelines']);
|
||||
break;
|
||||
}
|
||||
|
||||
return redirect(route('admin.settings.pages'));
|
||||
|
|
Loading…
Reference in a new issue