about summary refs log tree commit diff
path: root/app/controllers/api/v1
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-07 16:00:11 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-07 16:00:11 +0200
commit1f650d327d35bc48b897da99914c43750d8e5fd3 (patch)
tree6960b24e30c46c55ba9f3bf1af0a24b43cd9d248 /app/controllers/api/v1
parent06016453bd91882a53e91c11fc80f2c75fd474bb (diff)
Adding public timeline
Diffstat (limited to 'app/controllers/api/v1')
-rw-r--r--app/controllers/api/v1/statuses_controller.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb
index ec1056a42..952ed641d 100644
--- a/app/controllers/api/v1/statuses_controller.rb
+++ b/app/controllers/api/v1/statuses_controller.rb
@@ -46,9 +46,16 @@ class Api::V1::StatusesController < ApiController
 
   def home
     @statuses = Feed.new(:home, current_user.account).get(20, params[:max_id], params[:since_id]).to_a
+    render action: :index
   end
 
   def mentions
     @statuses = Feed.new(:mentions, current_user.account).get(20, params[:max_id], params[:since_id]).to_a
+    render action: :index
+  end
+
+  def public
+    @statuses = Status.with_includes.with_counters.order('id desc').paginate_by_max_id(20, params[:max_id], params[:since_id]).to_a
+    render action: :index
   end
 end