mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
DEV: Remove unused server-side route. (#14011)
We no longer use this route. When a staff member wants to see a user flagged posts, we redirect them to the review queue.
This commit is contained in:
@ -554,22 +554,6 @@ class PostsController < ApplicationController
|
||||
render body: nil
|
||||
end
|
||||
|
||||
def flagged_posts
|
||||
params.permit(:offset, :limit)
|
||||
guardian.ensure_can_see_flagged_posts!
|
||||
|
||||
user = fetch_user_from_params
|
||||
offset = [params[:offset].to_i, 0].max
|
||||
limit = [(params[:limit] || 60).to_i, 100].min
|
||||
|
||||
posts = user_posts(guardian, user.id, offset: offset, limit: limit)
|
||||
.where(id: PostAction.where(post_action_type_id: PostActionType.notify_flag_type_ids)
|
||||
.where(disagreed_at: nil)
|
||||
.select(:post_id))
|
||||
|
||||
render_serialized(posts, AdminUserActionSerializer)
|
||||
end
|
||||
|
||||
def deleted_posts
|
||||
params.permit(:offset, :limit)
|
||||
guardian.ensure_can_see_deleted_posts!
|
||||
|
Reference in New Issue
Block a user