api/v0: make Tags model random_id return the display

This commit is contained in:
Lucas Gabriel Vuotto 2025-05-03 17:55:26 +00:00
parent d44435ac73
commit c1463b36ef

View file

@ -23,7 +23,7 @@ sub count ($self)
sub random_id ($self) sub random_id ($self)
{ {
my $row = $self->{_dbh}->selectrow_arrayref(q{ my $row = $self->{_dbh}->selectrow_arrayref(q{
SELECT id FROM tag ORDER BY random() LIMIT 1 SELECT display FROM tag ORDER BY random() LIMIT 1
}); });
return defined($row) ? $row->[0] : undef; return defined($row) ? $row->[0] : undef;