OSDN Git Service

Web::Controller::Timeline: sort by create_time in recent page
authorhylom <hylom@users.sourceforge.jp>
Thu, 25 Apr 2019 11:23:37 +0000 (20:23 +0900)
committerhylom <hylom@users.sourceforge.jp>
Thu, 25 Apr 2019 11:23:37 +0000 (20:23 +0900)
src/newslash_web/lib/Newslash/Web/Controller/Timeline.pm

index f451b70..9c398fb 100644 (file)
@@ -130,7 +130,8 @@ sub recent {
     else {
         $timeline = $c->ccache->model('timeline');
     }
-    my $items = $timeline->select(limit => $limit);
+    my $items = $timeline->select(limit => $limit,
+                                  order_by => {create_time => 'DESC'});
 
     $c->_render_timeline(items => $items,
                          content_type => "recent",