From f21854d75c55096ce0e1c287513f75997fde75b3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B8rn=20Rustad?= Date: Sat, 17 Aug 2013 16:37:19 +0200 Subject: [PATCH] Remove non-working rider import --- lib/Duplo.pm | 5 ----- lib/Duplo/Results.pm | 20 -------------------- templates/results/import_form.html.ep | 6 ------ 3 files changed, 31 deletions(-) diff --git a/lib/Duplo.pm b/lib/Duplo.pm index 98b1e12..a66cede 100644 --- a/lib/Duplo.pm +++ b/lib/Duplo.pm @@ -133,11 +133,6 @@ sub startup { ->via('post') ->to('results#rider_list_import'); - $adm->route('/results/rider_import') - ->name('results_rider_import') - ->via('post') - ->to('results#rider_import'); - $adm->route('/results/rider_team_import') ->name('results_rider_team_import') ->via('post') diff --git a/lib/Duplo/Results.pm b/lib/Duplo/Results.pm index 435a896..adc9d5a 100644 --- a/lib/Duplo/Results.pm +++ b/lib/Duplo/Results.pm @@ -165,26 +165,6 @@ sub rider_team_import { return $self->redirect_to('results_import_form'); } -sub rider_import { - my $self = shift; - my $dbh = $self->db(); - my $url = $self->param('url'); - - my $ua = Mojo::UserAgent->new; - my $tx = $ua->get($url); - - my $name = decode('UTF-8', $tx->res->dom->at('span#rider-name')->text); - my $id = $tx->res->dom->at('input#rider-id')->{'value'}; - - $dbh->do(" - INSERT INTO - rider (name, cyclingdatabase_id) - VALUES (?, ?) - ", undef, $name, $id); - - return $self->redirect_to('results_import_form'); -} - sub import { my $self = shift; my $dbh = $self->db(); diff --git a/templates/results/import_form.html.ep b/templates/results/import_form.html.ep index 8439362..7bca53a 100644 --- a/templates/results/import_form.html.ep +++ b/templates/results/import_form.html.ep @@ -13,12 +13,6 @@ -

Import single rider

-
- - -
-

Import rider-team connections

-- 2.47.3