|
|
@@ -110,7 +110,8 @@ class PostsController < ApplicationController |
|
|
|
original_created_before = params[:original_created_before] |
|
|
|
|
|
|
|
post = Post.find(params[:id].to_i) |
|
|
|
tags = post.tags.where(category: 'nico').to_a + Tag.normalise_tags(tag_names) |
|
|
|
tags = post.tags.where(category: 'nico').to_a + |
|
|
|
Tag.normalise_tags(tag_names, with_tagme: false) |
|
|
|
if post.update(title:, tags:, original_created_from:, original_created_before:) |
|
|
|
render json: post.as_json(include: { tags: { only: [:id, :name, :category, :post_count] } }), |
|
|
|
status: :ok |
|
|
|