From a081d61c67ac6e75e5375e6560f48e2a2bbf96bb Mon Sep 17 00:00:00 2001 From: NyanLinHtut Date: Thu, 14 Jul 2022 15:49:59 +0630 Subject: [PATCH] fix search customer --- app/controllers/api/customers_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/customers_controller.rb b/app/controllers/api/customers_controller.rb index daa72b70..62bc8a7b 100755 --- a/app/controllers/api/customers_controller.rb +++ b/app/controllers/api/customers_controller.rb @@ -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"],