From 335084923e52e6627298b417a0a89039a280449b Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sun, 11 Jun 2023 20:41:21 -0400 Subject: [PATCH] interest count --- www-api/app/Models/ResultFormatter.php | 2 ++ www-api/public/svs/user/formarter.php | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/www-api/app/Models/ResultFormatter.php b/www-api/app/Models/ResultFormatter.php index 8ccaa637..b5c70ef1 100644 --- a/www-api/app/Models/ResultFormatter.php +++ b/www-api/app/Models/ResultFormatter.php @@ -251,6 +251,7 @@ class ResultFormatter extends Model ); for ($i = 0; $i < $total; $i++) { $key = sprintf("%05d", $i); + $int_c = 'interest_count_'.$out["offer_code_${key}"]; $res["result_list"][] = array( "title" => $out["title_${key}"], "description" => $out["description_${key}"], @@ -271,6 +272,7 @@ class ResultFormatter extends Model 'job_country' => $out["job_country_${key}"], 'currency' => 'Naira', 'currency_code' => 'NGN', + 'interest_count' => $out["${$int_c}"] ?? 0, 'category' => $this->dummyGetCategory() ); } diff --git a/www-api/public/svs/user/formarter.php b/www-api/public/svs/user/formarter.php index 104476d1..3e4122c5 100755 --- a/www-api/public/svs/user/formarter.php +++ b/www-api/public/svs/user/formarter.php @@ -285,6 +285,9 @@ function processOutJson($in, $out) { ); for ($i = 0; $i < $total; $i++) { $key = sprintf("%05d", $i); + + $int_c = 'interest_count_'.$out["offer_code_${key}"]; + $res["result_list"][] = array( "title" => $out["title_${key}"], "description" => $out["description_${key}"], @@ -307,6 +310,7 @@ function processOutJson($in, $out) { 'job_country' => $out["job_country_${key}"], 'currency' => 'Naira', 'currency_code' => 'NGN', + 'interest_count' => $out["${$int_c}"] ?? 0, 'category' => dummyGetCategory() ); }