diff --git a/lib/Pooru/API/V0/Controller/Media.pm b/lib/Pooru/API/V0/Controller/Media.pm index af54e17..c59b8a9 100644 --- a/lib/Pooru/API/V0/Controller/Media.pm +++ b/lib/Pooru/API/V0/Controller/Media.pm @@ -1,6 +1,8 @@ package Pooru::API::V0::Controller::Media; use Mojo::Base "Mojolicious::Controller", -signatures; +use List::Util qw(uniq); + my %search_opts = Pooru::API::V0::_search_opts->%*; sub _list_no_tags ($self, $page) @@ -64,7 +66,7 @@ sub list ($self) status => 400, ) if $v->has_error; - my @tags = split(" ", $v->optional("tags")->param // ""); + my @tags = uniq split(" ", $v->optional("tags")->param // ""); return $self->render( json => {error => "Invalid tags."}, status => 400,