mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FEATURE: ability to hide or show specific post revisions
This commit is contained in:
@ -216,6 +216,20 @@ class PostsController < ApplicationController
|
||||
render_json_dump(post_revision_serializer)
|
||||
end
|
||||
|
||||
def hide_revision
|
||||
post_revision = find_post_revision_from_params
|
||||
guardian.ensure_can_hide_post_revision! post_revision
|
||||
post_revision.hide!
|
||||
render nothing: true
|
||||
end
|
||||
|
||||
def show_revision
|
||||
post_revision = find_post_revision_from_params
|
||||
guardian.ensure_can_show_post_revision! post_revision
|
||||
post_revision.show!
|
||||
render nothing: true
|
||||
end
|
||||
|
||||
def bookmark
|
||||
post = find_post_from_params
|
||||
if current_user
|
||||
|
Reference in New Issue
Block a user