Require there be a path.

master
Manager Bot 3 years ago
parent f21d492c19
commit 19d9d0e6f1
  1. 6
      Web/lib/MJB/Web/Controller/Dashboard.pm

@ -427,6 +427,12 @@ sub do_blog_page ( $c ) {
my $path = $c->param('pagePath'); my $path = $c->param('pagePath');
my $content = $c->param('pageContent'); my $content = $c->param('pageContent');
my $headers = $c->param('pageHeaders'); my $headers = $c->param('pageHeaders');
if ( ! $path ) {
$c->flash( error_message => "You must add a filepath for the HTML file." );
$c->redirect_to( $c->url_for( 'show_dashboard_blog_page', { id => $blog->id } ) );
return;
}
my $jekyll = $c->jekyll($blog->domain->name); my $jekyll = $c->jekyll($blog->domain->name);

Loading…
Cancel
Save