module Api module V1 class OpportunitiesController < BaseController def update_stage source = params[:opportunity].presence || params render_agent Crm::AgentSession.new(current_user).update_opportunity_stage( params[:project_code], params[:id], pipeline_stage: source[:pipeline_stage], lost_reason: source[:lost_reason], notes: source[:notes] ) end end end end