api: inline ROUTES
This commit is contained in:
parent
1ac5d07821
commit
861593d26d
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user