summaryrefslogtreecommitdiff
path: root/lib/Travelynx.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travelynx.pm')
-rwxr-xr-xlib/Travelynx.pm18
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm
index 576e715..fd59cc0 100755
--- a/lib/Travelynx.pm
+++ b/lib/Travelynx.pm
@@ -6,7 +6,6 @@ use Mojolicious::Plugin::Authentication;
use Cache::File;
use Crypt::Eksblowfish::Bcrypt qw(bcrypt en_base64);
use DateTime;
-use DBI;
use Encode qw(decode encode);
use Geo::Distance;
use JSON;
@@ -148,23 +147,6 @@ sub startup {
}
);
- $self->attr(
- dbh => sub {
- my ($self) = @_;
- my $config = $self->app->config;
-
- my $dbname = $config->{db}->{database};
- my $host = $config->{db}->{host} // 'localhost';
- my $port = $config->{db}->{port} // 5432;
- my $user = $config->{db}->{user};
- my $pw = $config->{db}->{password};
-
- return DBI->connect(
- "dbi:Pg:dbname=${dbname};host=${host};port=${port}",
- $user, $pw, { AutoCommit => 1 } );
- }
- );
-
$self->helper(
sendmail => sub {
state $sendmail = Travelynx::Helper::Sendmail->new(