fix search customer

This commit is contained in:
NyanLinHtut
2022-07-14 15:49:59 +06:30
parent 92083777a0
commit a081d61c67

View File

@@ -24,8 +24,8 @@ class Api::CustomersController < Api::ApiController
def get_customer_by_account def get_customer_by_account
account_no = params[:account_no] account_no = params[:account_no]
unless @customer = Customer.find_by(paypar_account_no: account_no); unless @customer = Customer.find_by(paypar_account_no: account_no)
response = Customer.search_paypar_account_no(filter) response = Customer.search_paypar_account_no(account_no)
if response["status"] == true if response["status"] == true
@customer = Customer.create({ @customer = Customer.create({
name: response["customer_data"]["name"], name: response["customer_data"]["name"],