diff --git a/www-api/app/Models/ResultFormatter.php b/www-api/app/Models/ResultFormatter.php index 33ef221a..160d4340 100644 --- a/www-api/app/Models/ResultFormatter.php +++ b/www-api/app/Models/ResultFormatter.php @@ -105,6 +105,28 @@ class ResultFormatter extends Model // id AS coupon_id, ca.code, ca.amount, ca.added::date,ca.status switch ($in["action"]) { + case WRENCHBOARD_ACCOUNT_RECENTS: + $total = $out["total_record"]; + $res = array( + "status" => $out["status"], + "total_record" => ($total), + "internal_return" => $out["internal_return"], + "result_list" => array(), + ); + for ($i = 0; $i < $total; $i++) { + $key = sprintf("%05d", $i); + $banner_img = ( $out["banner_${key}"] !="" ) ? $out["banner_${key}"] : 'default.jpg'; + $res["result_list"][] = array( + "uid" => $out["uid_${key}"], + "description" => $out["description_${key}"], + "title" => $out["title_${key}"], + "added" => $out["added_${key}"], + "status" => $out["status_${key}"], + "banner" => $banner_img, + ); + } + break; + case WRENCHBOARD_MYFILES_LIST: $total = $out["total_record"]; $res = array(