mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
FEATURE: add 'rebake post' in post wrench menu
This commit is contained in:
@ -252,6 +252,15 @@ class PostsController < ApplicationController
|
||||
render nothing: true
|
||||
end
|
||||
|
||||
def rebake
|
||||
guardian.ensure_can_rebake!
|
||||
|
||||
post = find_post_from_params
|
||||
post.rebake!(invalidate_oneboxes: true)
|
||||
|
||||
render nothing: true
|
||||
end
|
||||
|
||||
def flagged_posts
|
||||
params.permit(:offset, :limit)
|
||||
guardian.ensure_can_see_flagged_posts!
|
||||
|
Reference in New Issue
Block a user