backend: fix API /media call

This commit is contained in:
Lucas 2023-03-09 20:57:01 +00:00
parent 02c7c3c0db
commit 1ea50ed54f

View File

@ -20,7 +20,7 @@ sub index ($self)
my $poorbooru_api = $self->config("poorbooru_api"); my $poorbooru_api = $self->config("poorbooru_api");
my $ua = Mojo::UserAgent->new; my $ua = Mojo::UserAgent->new;
my $res = $ua->get("$poorbooru_api/media" => form => { page => $page })->result; my $res = $ua->get("$poorbooru_api/media?page=$page")->result;
return $self->render(status => $res->code) if $res->is_error; return $self->render(status => $res->code) if $res->is_error;