diff --git a/app/controllers/api/v1/accounts/statuses_controller.rb b/app/controllers/api/v1/accounts/statuses_controller.rb index 4ad9e929..32ef09d2 100644 --- a/app/controllers/api/v1/accounts/statuses_controller.rb +++ b/app/controllers/api/v1/accounts/statuses_controller.rb @@ -12,7 +12,7 @@ class Api::V1::Accounts::StatusesController < Api::BaseController return render json: { "error": true }, status: 429 end end - + @statuses = load_statuses render json: @statuses, each_serializer: REST::StatusSerializer, @@ -39,6 +39,7 @@ class Api::V1::Accounts::StatusesController < Api::BaseController if current_account.nil? statuses = statuses.limit(8) + statuses = statuses.where("created_at > NOW() - INTERVAL '30 days'") else statuses = statuses.paginate_by_id(limit_param(DEFAULT_STATUSES_LIMIT), params_slice(:max_id, :since_id, :min_id)) end diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb index a9db3ab0..82dc7f5f 100644 --- a/app/controllers/api/v1/statuses_controller.rb +++ b/app/controllers/api/v1/statuses_controller.rb @@ -51,7 +51,6 @@ class Api::V1::StatusesController < Api::BaseController def create markdown = status_params[:markdown] unless status_params[:markdown] === status_params[:status] - @status = PostStatusService.new.call(current_user.account, text: status_params[:status], markdown: markdown,