mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
Wiki Post
This commit is contained in:
@ -208,6 +208,17 @@ class PostsController < ApplicationController
|
||||
render nothing: true
|
||||
end
|
||||
|
||||
def wiki
|
||||
guardian.ensure_can_wiki!
|
||||
|
||||
post = find_post_from_params
|
||||
post.wiki = params[:wiki]
|
||||
post.version += 1
|
||||
post.save
|
||||
|
||||
render nothing: true
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def find_post_revision_from_params
|
||||
|
Reference in New Issue
Block a user