mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 14:35:17 +08:00
Fix all the trailing whitespace
This commit is contained in:
@ -16,8 +16,8 @@ class PostActionsController < ApplicationController
|
||||
|
||||
post_serializer = PostSerializer.new(@post, scope: guardian, root: false)
|
||||
render_json_dump(post_serializer)
|
||||
else
|
||||
raise Discourse::InvalidParameters.new(:post_action_type_id)
|
||||
else
|
||||
raise Discourse::InvalidParameters.new(:post_action_type_id)
|
||||
end
|
||||
end
|
||||
|
||||
@ -52,7 +52,7 @@ class PostActionsController < ApplicationController
|
||||
PostAction.clear_flags!(@post, current_user.id, params[:post_action_type_id].to_i)
|
||||
@post.reload
|
||||
|
||||
if @post.is_flagged?
|
||||
if @post.is_flagged?
|
||||
render json: {success: true, hidden: true}
|
||||
else
|
||||
@post.unhide!
|
||||
@ -62,9 +62,9 @@ class PostActionsController < ApplicationController
|
||||
|
||||
private
|
||||
|
||||
def fetch_post_from_params
|
||||
def fetch_post_from_params
|
||||
requires_parameter(:id)
|
||||
@post = Post.where(id: params[:id]).first
|
||||
@post = Post.where(id: params[:id]).first
|
||||
guardian.ensure_can_see!(@post)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user