diff --git a/www-api/app/Models/ResultFormatter.php b/www-api/app/Models/ResultFormatter.php index e4292cc6..965c5e37 100644 --- a/www-api/app/Models/ResultFormatter.php +++ b/www-api/app/Models/ResultFormatter.php @@ -338,6 +338,27 @@ class ResultFormatter extends Model ); } break; + + case WRENCHBOARD_ACCOUNT_REFFERHX: + $total = $out["total_record"]; + $res = array( + "status" => $out["status"], + "total_record" => ($total - 1), + "internal_return" => $out["internal_return"], + "result_list" => array(), + ); + for ($i = 0; $i < $total; $i++) { + $key = sprintf("%05d", $i); + $res["result_list"][] = array( + "added_date" => $out["added_date_${key}"], + "email" => $out["email_${key}"], + "firstname" => $out["firstname_${key}"], + "lastname" => $out["lastname_${key}"], + "status" => $out["status_${key}"] + ); + } + break; + case WRENCHBOARD_ACCOUNT_WALLETS: $total = $out["total_record"]; $res = array( diff --git a/www-api/public/svs/user/formarter.php b/www-api/public/svs/user/formarter.php index 8aeab249..8d730158 100755 --- a/www-api/public/svs/user/formarter.php +++ b/www-api/public/svs/user/formarter.php @@ -312,6 +312,27 @@ function processOutJson($in, $out) { ); } break; + + case WRENCHBOARD_ACCOUNT_REFFERHX: + $total = $out["total_record"]; + $res = array( + "status" => $out["status"], + "total_record" => ($total - 1), + "internal_return" => $out["internal_return"], + "result_list" => array(), + ); + for ($i = 0; $i < $total; $i++) { + $key = sprintf("%05d", $i); + $res["result_list"][] = array( + "added_date" => $out["added_date_${key}"], + "email" => $out["email_${key}"], + "firstname" => $out["firstname_${key}"], + "lastname" => $out["lastname_${key}"], + "status" => $out["status_${key}"] + ); + } + break; + case WRENCHBOARD_ACCOUNT_WALLETS: $total = $out["total_record"]; $res = array(