<commit_before><?php

//GET route
$app->get('/', function () use ($app) {
    if ($app->request()->get('c')) {
        // found link to a legacy chart
        $app->redirect('/legacy/'.$app->request()->get('c').'.html');
    } else {

        $chart_ids = array('RXoKw', 'rf47Q', 'a4Yyf', '78iap');
        $charts = ChartQuery::create()->findPKs($chart_ids);

        $page = array(
            'title' => 'Datawrapper',
            'pageClass' => 'home',
            'recent_charts' => $charts
        );
        add_header_vars($page, '');

        $res = $app->response();
        $res['Cache-Control'] = 'max-age=0';
        $app->render('home.twig', $page);
    }
});

$app->get('/legacy/actions/export.php', function() use ($app) {
    $c = $app->request()->get('c');<commit_msg>directly redirect users to chart creation, skipping the homepage<commit_after><?php

//GET route
$app->get('/', function () use ($app) {
    if ($app->request()->get('c')) {
        // found link to a legacy chart
        $app->redirect('/legacy/'.$app->request()->get('c').'.html');
    } else {

        $chart_ids = array('RXoKw', 'rf47Q', 'a4Yyf', '78iap');
        $charts = ChartQuery::create()->findPKs($chart_ids);

        $page = array(
            'title' => 'Datawrapper',
            'pageClass' => 'home',
            'recent_charts' => $charts
        );
        add_header_vars($page, '');

        $res = $app->response();
        $res['Cache-Control'] = 'max-age=0';
        //$app->render('home.twig', $page);
        $app->redirect('/chart/create');
    }
});

$app->get('/legacy/actions/export.php', function() use ($app) {
    $c = $app->request()->get('c');
{'fraction_non_alphanumeric': 0.23589435774309725, 'fraction_numerical': 0.007202881152460984, 'mean_word_length': 2.451345755693582, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 34, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3055380', 'n_tokens_mistral': 567, 'n_tokens_neox': 550, 'n_words': 98}