Пример #1
0
    fAuthorization::requireLoggedIn();
    $controller = new UserController();
    $controller->changePassword();
});
$app->post('/change/password', function () {
    fAuthorization::requireLoggedIn();
    $controller = new UserController();
    $controller->updatePassword();
});
$app->get('/home', function () {
    $controller = new HomeController();
    $controller->index();
});
$app->get('/sets', function () {
    $controller = new HomeController();
    $controller->showProblemSets();
});
$app->get('/page/:name', function ($name) {
    $controller = new HomeController();
    $controller->showPage($name);
});
$app->get('/problems', function () {
    $controller = new ProblemController();
    $controller->index();
});
$app->get('/submit', function () {
    fAuthorization::requireLoggedIn();
    User::requireEmailVerified();
    $controller = new SubmitController();
    $controller->index();
});