diff --git a/lib/BurguillosInfo/DB/Migrations.pm b/lib/BurguillosInfo/DB/Migrations.pm index 6dfccca..8f8141a 100644 --- a/lib/BurguillosInfo/DB/Migrations.pm +++ b/lib/BurguillosInfo/DB/Migrations.pm @@ -39,6 +39,7 @@ sub MIGRATIONS { 'ALTER TABLE requests ADD COLUMN subdivision TEXT;', 'CREATE INDEX request_subdivision_index on requests (subdivision);', \&_populate_locations, + \&_populate_locations, ); } diff --git a/lib/BurguillosInfo/Tracking.pm b/lib/BurguillosInfo/Tracking.pm index def0d25..7079a16 100644 --- a/lib/BurguillosInfo/Tracking.pm +++ b/lib/BurguillosInfo/Tracking.pm @@ -54,8 +54,8 @@ sub _register_request_query ( $self, $remote_address, $user_agent, $params_json, $path, $referer ) { my $dbh = BurguillosInfo::DB->connect($app); - my $country = $self->_get_country('185.244.231.157'); - my $subdivision = $self->_get_subdivision('185.244.231.157'); + my $country = $self->_get_country($remote_address); + my $subdivision = $self->_get_subdivision($remote_address); $dbh->do( <<'EOF', undef, $remote_address, $user_agent, $params_json, $path, $referer, $country, $subdivision );