diff --git a/brain/App.inc.php b/brain/App.inc.php new file mode 100644 index 0000000..73b4058 --- /dev/null +++ b/brain/App.inc.php @@ -0,0 +1,40 @@ +add(TwigMiddleware::create($app, $twig)); + //set up routing + $app->get( + "/[{first}[/{second}[/{third}[/{fourth}]]]]", + "\RouteControl:get" + ); + $app->post( + "/[{first}[/{second}[/{third}[/{fourth}]]]]", + "\RouteControl:post" + ); + //start the app + + $app->run(); + } +} diff --git a/brain/data/Book.inc.php b/brain/data/Book.inc.php index db08ece..7d8bc3c 100644 --- a/brain/data/Book.inc.php +++ b/brain/data/Book.inc.php @@ -150,7 +150,7 @@ class Book //once saved, update menu $body["path"] = $path; Settings::updateMenu($body); - Settings::updateTags(); + //Settings::updateTags(); } else { $response = [ "message" => "Uh oh. File save problem. Don't panic", diff --git a/public/index.php b/public/index.php index 63323b6..f72c1bd 100644 --- a/public/index.php +++ b/public/index.php @@ -1,29 +1,4 @@ add(TwigMiddleware::create($app, $twig)); -//set up routing -$app->get("/[{first}[/{second}[/{third}[/{fourth}]]]]", "\RouteControl:get"); -$app->post("/[{first}[/{second}[/{third}[/{fourth}]]]]", "\RouteControl:post"); -//start the app - -$app->run(); +include "../brain/App.inc.php"; +new App();