fix: Incorrect Scoping in Contact API (#1674)
This commit is contained in:
@@ -46,7 +46,7 @@ class Api::V1::Accounts::ContactsController < Api::V1::Accounts::BaseController
|
|||||||
rescue ActiveRecord::RecordInvalid => e
|
rescue ActiveRecord::RecordInvalid => e
|
||||||
render json: {
|
render json: {
|
||||||
message: e.record.errors.full_messages.join(', '),
|
message: e.record.errors.full_messages.join(', '),
|
||||||
contact: Contact.find_by(email: contact_params[:email])
|
contact: Current.account.contacts.find_by(email: contact_params[:email])
|
||||||
}, status: :unprocessable_entity
|
}, status: :unprocessable_entity
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user