Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

Commit

Permalink
logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Lushpai committed Jun 18, 2013
1 parent 1799bc9 commit ff067b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api.pl
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
get '/*domain/queue' => sub {
my $self = shift;
my $domain = $self->param('domain');
my $db = DBI->connect("dbi:SQLite:dbname=db/queue.db","","");
my $db = DBI->connect("dbi:SQLite:dbname=db/queue.db","","") or app->log->debug('Starting application.');
$db->{sqlite_unicode} = 1;
my $query = $db->do("INSERT INTO domain (domain, status) VALUES('$domain', 0)");
my $query = $db->do("INSERT INTO domain (domain, status) VALUES('$domain', 0)") or app->log->debug('Starting application.');
$query > 0
? $self->render(json => {"status" => "success", "message" => "$domain placed in queue"})
: $self->render(json => {"status" => "error", "message" => "queue crushed"});
};

app->log->debug('Starting application.');

app->start;
Empty file added log/.gitkeep
Empty file.

0 comments on commit ff067b7

Please sign in to comment.