Files
eminuxCRM/app/controllers/api/v1/opportunities_controller.rb
eminuxandCursor 936930e691 Espone API JSON e MCP HTTP per far lavorare gli agenti sul CRM.
Gli agenti autenticati con token Bearer possono leggere today/pipeline e annotare attività, con host MCP allineati a quelli di produzione.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 22:43:46 +02:00

17 lines
459 B
Ruby

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