Add a date limit on accounts-statusescontroller without auth
This commit is contained in:
parent
940b6eb392
commit
b33c16b131
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue