Exemple #1
0
    $controller->show($id);
});
$app->get('/contest/:id/register', function ($id) {
    Util::redirect("/contest/{$id}");
});
$app->post('/contest/:id/register', function ($id) {
    fAuthorization::requireLoggedIn();
    User::requireEmailVerified();
    $controller = new ReportController();
    $controller->newRegistration($id);
});
$app->post('/contest/:id/question', function ($id) {
    fAuthorization::requireLoggedIn();
    User::requireEmailVerified();
    $controller = new ReportController();
    $controller->newQuestion($id);
});
$app->post('/question/:id/reply', function ($id) {
    fAuthorization::requireLoggedIn();
    $controller = new ReportController();
    $controller->replyQuestion($id);
});
$app->post('/question/:id/toggle', function ($id) {
    fAuthorization::requireLoggedIn();
    $controller = new ReportController();
    $controller->toggleQuestionVisibility($id);
});
$app->get('/polling/:secret', function ($secret) {
    if (JUDGER_SECRET != $secret) {
        exit;
    }