Commit 94424366 authored by Taddeüs Kroes's avatar Taddeüs Kroes

Removed databsae population route

parent 36a1fcb8
...@@ -67,7 +67,7 @@ $user = new Nette\Security\User($storage, $authenticator); ...@@ -67,7 +67,7 @@ $user = new Nette\Security\User($storage, $authenticator);
$app->hook('slim.before.router', function () use ($app, $user) { $app->hook('slim.before.router', function () use ($app, $user) {
$url = $app->request()->getPathInfo(); $url = $app->request()->getPathInfo();
$non_user_urls = array('/login', '/register', '/populate'); $non_user_urls = array('/login', '/register');
if (!in_array($url, $non_user_urls) && !$user->isLoggedIn()) if (!in_array($url, $non_user_urls) && !$user->isLoggedIn())
$app->redirect(ROOT_URL . '/login'); $app->redirect(ROOT_URL . '/login');
...@@ -82,8 +82,5 @@ require 'routes/register.php'; ...@@ -82,8 +82,5 @@ require 'routes/register.php';
require 'routes/user.php'; require 'routes/user.php';
require 'routes/match.php'; require 'routes/match.php';
// XXX: debug code
require 'populate.php';
$view->replace(compact('app', 'config', 'user')); $view->replace(compact('app', 'config', 'user'));
$app->run(); $app->run();
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment