Added get_latest and test for it on leaderboard
This commit is contained in:
parent
2e3bc489ea
commit
7e11fc50bd
2 changed files with 49 additions and 13 deletions
|
@ -196,7 +196,11 @@ sub _create_count_all_time {
|
|||
sub get_latest {
|
||||
my $self = shift;
|
||||
|
||||
return $self;
|
||||
my $latest = $self->search_related('sets', {}, {
|
||||
order_by => { -desc => 'date' },
|
||||
})->first;
|
||||
|
||||
return $latest;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
Reference in a new issue