class Decidim::Meetings::MeetingsController

def create

def create
  enforce_permission_to :create, :meeting
  @form = meeting_form.from_params(params, current_component: current_component)
  CreateMeeting.call(@form) do
    on(:ok) do |meeting|
      flash[:notice] = I18n.t("meetings.create.success", scope: "decidim.meetings")
      redirect_to meeting_path(meeting)
    end
    on(:invalid) do
      flash.now[:alert] = I18n.t("meetings.create.invalid", scope: "decidim.meetings")
      render action: "new"
    end
  end
end