diff --git a/lib/PoorBooru/API/V0.pm b/lib/PoorBooru/API/V0.pm index 2113355..5e5a190 100644 --- a/lib/PoorBooru/API/V0.pm +++ b/lib/PoorBooru/API/V0.pm @@ -7,16 +7,6 @@ our $VERSION = v0; set serializer => "JSON"; use constant { - ROUTES => [ - { path => "/meta", verb => "GET" }, - { path => "/tags", verb => "GET" }, - { path => "/tags", verb => "POST" }, - { path => "/tag/:tag_id_or_name", verb => "GET" }, - { path => "/media/:media_id", verb => "GET" }, - { path => "/download/:media_id", verb => "GET" }, - { path => "/random", verb => "GET" }, - ], - DEFAULT_CONTENT_TYPE => "application/json", }; @@ -46,7 +36,15 @@ sub mkpager ($) } get "/meta" => sub { - return ROUTES; + return [ + { path => "/meta", verb => "GET" }, + { path => "/tags", verb => "GET" }, + { path => "/tags", verb => "POST" }, + { path => "/tag/:tag_id_or_name", verb => "GET" }, + { path => "/media/:media_id", verb => "GET" }, + { path => "/download/:media_id", verb => "GET" }, + { path => "/random", verb => "GET" }, + ], }; get "/tags" => sub {