diff --git a/backend/app/plugins/wiaas/includes/api/class-wiaas-rest-delivery-process-api.php b/backend/app/plugins/wiaas/includes/api/class-wiaas-rest-delivery-process-api.php index de409a7..0cfb9d1 100644 --- a/backend/app/plugins/wiaas/includes/api/class-wiaas-rest-delivery-process-api.php +++ b/backend/app/plugins/wiaas/includes/api/class-wiaas-rest-delivery-process-api.php @@ -93,7 +93,29 @@ class Wiass_REST_Delivery_Process_API { ); } - return rest_ensure_response($data); + global $wpdb; + + + $data = array(); + $total = 0; + $queries =$wpdb->queries; + foreach ($queries as $query) { + $data[] = array( + $query[0], + $query[1] + ); + + $total += $query[1]; + } + + global $wp_timer; + + + return rest_ensure_response(array( + 'data' => $queries, + 'total' => $total * 1000, + 'start' => (microtime() - $wp_timer) * 1000 + )); } public static function get_customer_acceptance(WP_REST_Request $request){ diff --git a/backend/config/environments/staging.php b/backend/config/environments/staging.php index ae4da8c..b0def10 100644 --- a/backend/config/environments/staging.php +++ b/backend/config/environments/staging.php @@ -1,6 +1,6 @@