class TagDisciplinesController < ApplicationController
  before_action :require_login

  def create
    sub_discipline = SubDiscipline.find_by!(id: params[:sub_discipline_id])
    tag_discipline = TagDiscipline.create!(name: params[:name].to_s.strip, sub_discipline: sub_discipline, user_id: current_user.id)
    render_ok({tag_discipline_id: tag_discipline.id})
  end
end