mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update PageController
This commit is contained in:
parent
e3cfd8170f
commit
7ade78b4ee
1 changed files with 3 additions and 0 deletions
|
@ -38,6 +38,9 @@ class PageController extends Controller
|
|||
'page' => 'required|string'
|
||||
]);
|
||||
$slug = urldecode($request->page);
|
||||
if(in_array($slug, array_keys($this->cacheKeys())) == false) {
|
||||
return redirect(route('admin.settings.pages'));
|
||||
}
|
||||
$page = Page::firstOrCreate(['slug' => $slug]);
|
||||
return view('admin.pages.edit', compact('page'));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue