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>
24 lines
624 B
Ruby
24 lines
624 B
Ruby
module Api
|
|
module V1
|
|
class TasksController < BaseController
|
|
def create
|
|
render_agent Crm::AgentSession.new(current_user).create_task(params[:project_code], task_params)
|
|
end
|
|
|
|
def complete
|
|
render_agent Crm::AgentSession.new(current_user).complete_task(params[:project_code], params[:id])
|
|
end
|
|
|
|
private
|
|
|
|
def task_params
|
|
source = params[:task].presence || params
|
|
source.permit(
|
|
:title, :description, :organization_id, :contact_id, :opportunity_id,
|
|
:assigned_user_id, :due_at, :priority, :task_type
|
|
)
|
|
end
|
|
end
|
|
end
|
|
end
|