FIX 取消创建帖子的审核功能(即创建立马发布)

This commit is contained in:
jasder 2021-05-10 17:21:36 +08:00
parent 976d020907
commit b079e0f835
1 changed files with 2 additions and 2 deletions

View File

@ -78,8 +78,8 @@ class MemosService
memo.author = current_user
memo.forum_section_id = params[:children_forum_id].present? ? params[:children_forum_id] : params[:forum_id]
# memo.published_at = Time.now if params[:memo][:published_at].blank?
memo.hidden = true
memo.published_at = Time.now if params[:memo][:published_at].blank?
memo.hidden = false
# memo.save!
if memo.save!
memo.update_attachments(params[:attachments]) if params[:attachments].present?