Skip to content
Snippets Groups Projects
Verified Commit 4a8755d5 authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Odstranen zbytecny modul

parent e0c77df4
No related branches found
No related tags found
No related merge requests found
Pipeline #681 passed
package PiTube; package PiTube;
use Mojo::Base 'Mojolicious'; use Mojo::Base 'Mojolicious';
use Mojo::Home;
use Mojo::Pg; use Mojo::Pg;
use Net::OAuth2::Profile::WebServer; use Net::OAuth2::Profile::WebServer;
use Mojolicious::Plugin::Authentication; use Mojolicious::Plugin::Authentication;
...@@ -19,15 +18,13 @@ sub startup { ...@@ -19,15 +18,13 @@ sub startup {
$self->plugin('PiTube::Helpers::OAuth2'); $self->plugin('PiTube::Helpers::OAuth2');
my $home = Mojo::Home->new()->detect;
# migrace schematu # migrace schematu
my $pg = Mojo::Pg->new my $pg = Mojo::Pg->new
->dsn($cfg->{database}{dsn}) ->dsn($cfg->{database}{dsn})
->username($cfg->{database}{user}) ->username($cfg->{database}{user})
->password($cfg->{database}{password}) ->password($cfg->{database}{password})
; ;
$pg->migrations->from_file("$home/sql/migrations.sql"); $pg->migrations->from_file($self->home . '/sql/migrations.sql');
$pg->migrations->migrate(); $pg->migrations->migrate();
# Spojeni s databazi # Spojeni s databazi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment