|
|
|
@ -40,7 +40,7 @@ class AddressSearchController < ApplicationController
|
|
|
|
|
address_service.call |
|
|
|
|
uprn_service.call |
|
|
|
|
|
|
|
|
|
results = (uprn_service.result.present? ? [uprn_service.result] : []) + (address_service.result.compact.any? ? address_service.result : []) |
|
|
|
|
results = [uprn_service.result, *address_service.result].compact |
|
|
|
|
|
|
|
|
|
if address_service.error.present? && uprn_service.error.present? |
|
|
|
|
render json: { error: "Address and UPRN are not recognised." }, status: :not_found |
|
|
|
|