This commit is contained in:
2025-12-21 04:29:01 +09:00
parent 573fec2ce1
commit 4c7c41c991
3 changed files with 136 additions and 176 deletions
@@ -39,6 +39,17 @@ class TagsController < ApplicationController
end
def update
return head :unauthorized unless current_user
return head :forbidden unless current_user.member?
tag = Tag.find(params[:id])
attrs = { name: params[:name].presence,
category: params[:category].presence }.compact
tag.update!(attrs) if attrs.present?
render json: tag
end
def destroy