api, backend: name routes
This commit is contained in:
parent
71d31e625a
commit
fc32afcb79
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user