api, backend: name routes

This commit is contained in:
Lucas 2023-03-17 20:08:08 +00:00
parent 71d31e625a
commit fc32afcb79
2 changed files with 11 additions and 11 deletions

View File

@ -24,16 +24,16 @@ sub startup ($self)
my $r = $self->routes;
$r->get("/meta")->to("meta#index");
$r->get("/meta")->to("meta#index")->name("meta");
$r->get("/tags")->to("tags#list");
$r->get("/tag/:tag_id_or_name")->to("tags#show");
$r->get("/tags")->to("tags#list")->name("tags_list");
$r->get("/tag/:tag_id_or_name")->to("tags#show")->name("tag_show");
$r->get("/media")->to("media#list");
$r->get("/media/:media_id")->to("media#show");
$r->get("/media")->to("media#list")->name("media_list");
$r->get("/media/:media_id")->to("media#show")->name("media_show");
$r->get("/random/media")->to("random#media");
$r->get("/random/tag")->to("random#tag");
$r->get("/random/media")->to("random#media")->name("media_random");
$r->get("/random/tag")->to("random#tag")->name("tag_random");
}
1;

View File

@ -41,11 +41,11 @@ sub startup ($self)
my $r = $self->routes;
$r->get("/")->to("media#list");
$r->get("/media/:media_id")->to("media#show");
$r->get("/")->to("media#list")->name("media_list");
$r->get("/media/:media_id")->to("media#show")->name("media_show");
$r->get("/tags")->to("tags#list");
$r->get("/tag/:tag_id_or_name")->to("tags#show");
$r->get("/tags")->to("tags#list")->name("tags_list");
$r->get("/tag/:tag_id_or_name")->to("tags#show")->name("tag_show");
}
1;