Fix: Update contact validation messages (#3500)

Fixes #3476
This commit is contained in:
thedev105
2021-12-03 10:49:11 +03:00
committed by GitHub
parent d7cfe6858e
commit 6d378eb206
8 changed files with 32 additions and 29 deletions

View File

@@ -81,11 +81,6 @@ class Api::V1::Accounts::ContactsController < Api::V1::Accounts::BaseController
def update
@contact.assign_attributes(contact_update_params)
@contact.save!
rescue ActiveRecord::RecordInvalid => e
render json: {
message: e.record.errors.full_messages.join(', '),
contact: Current.account.contacts.find_by(email: contact_params[:email])
}, status: :unprocessable_entity
end
def destroy