fix: Labels cannot be added to conversations (#1644)
This commit is contained in:
@@ -4,10 +4,10 @@ class Api::V1::Accounts::Contacts::LabelsController < Api::V1::Accounts::BaseCon
|
||||
private
|
||||
|
||||
def model
|
||||
@model ||= Current.account.contacts.find(params[:contact_id])
|
||||
@model ||= Current.account.contacts.find(permitted_params[:contact_id])
|
||||
end
|
||||
|
||||
def permitted_params
|
||||
params.permit(:contact_id, :labels)
|
||||
params.permit(:contact_id, labels: [])
|
||||
end
|
||||
end
|
||||
|
||||
@@ -8,6 +8,6 @@ class Api::V1::Accounts::Conversations::LabelsController < Api::V1::Accounts::Co
|
||||
end
|
||||
|
||||
def permitted_params
|
||||
params.permit(:conversation_id, :labels)
|
||||
params.permit(:conversation_id, labels: [])
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user