PoorBooru/lib/PoorBooru.pm

38 lines
607 B
Perl
Raw Normal View History

2023-02-18 10:49:05 +01:00
package PoorBooru;
use Dancer2;
use HTTP::Tiny;
our $VERSION = v0.1;
my $POORBOORU_API = setting("poorbooru_api");
hook before_template_render => sub {
my $tokens = shift;
$tokens->{uris}->{root} = uri_for("/");
$tokens->{uris}->{login} = uri_for("/login");
$tokens->{uris}->{logout} = uri_for("/logout");
$tokens->{uris}->{random} = uri_for("/random");
$tokens->{uris}->{tags} = uri_for("/tags");
};
get "/" => sub {
template "index" => {
"title" => "main",
};
};
get "/tags" => sub {
};
get "/tag/:tag_id" => sub {
};
get "/random" => sub {
};
get "/image/:image_id" => sub {
};
true;