Exemple #1
0
    $controller->manjudge(fRequest::get('id', 'integer'), fRequest::get('score', 'integer'));
});
$app->post('/reports', function () {
    fAuthorization::requireLoggedIn();
    $controller = new DashboardController();
    $controller->createReport();
});
$app->post('/dashboard/reports', function () {
    fAuthorization::requireLoggedIn();
    $controller = new DashboardController();
    $controller->manageReport(fRequest::get('id', 'integer'), fRequest::get('action', 'string'));
});
$app->post('/dashboard/permissions', function () {
    fAuthorization::requireLoggedIn();
    $controller = new DashboardController();
    $controller->managePermission(fRequest::get('action', 'string'));
});
$app->post('/set/variable', function () {
    fAuthorization::requireLoggedIn();
    $controller = new DashboardController();
    $controller->setVariable();
});
$app->get('/problem', function () {
    $controller = new ProblemController();
    $controller->show(fRequest::get('id', 'integer'));
});
$app->get('/problem/:id', function ($id) {
    $controller = new ProblemController();
    $controller->show($id);
});
$app->get('/record', function () {