fix search customer
This commit is contained in:
@@ -24,8 +24,8 @@ class Api::CustomersController < Api::ApiController
|
||||
def get_customer_by_account
|
||||
account_no = params[:account_no]
|
||||
|
||||
unless @customer = Customer.find_by(paypar_account_no: account_no);
|
||||
response = Customer.search_paypar_account_no(filter)
|
||||
unless @customer = Customer.find_by(paypar_account_no: account_no)
|
||||
response = Customer.search_paypar_account_no(account_no)
|
||||
if response["status"] == true
|
||||
@customer = Customer.create({
|
||||
name: response["customer_data"]["name"],
|
||||
|
||||
Reference in New Issue
Block a user