<?php
if (!defined('ABSPATH'))
  exit; // Exit if accessed directly
use AC_SYNC\Includes\Classes\Api\Action_Wear_Api_Route;
use AC_SYNC\Includes\Classes\Api\Action_Wear_API_Response as ApiResponse;
use AC_SYNC\Includes\Classes\Async\Action_Wear_Job_Queue as JobQueue;

$route = new Action_Wear_Api_Route("/get_product_status");
$route->setMethods("GET");
$route->setCallback(function () {
  $response = new ApiResponse();

  $data = [];
  $data["queueCount"] = JobQueue::countPending();

  $response->success($data);
  return $response->getResponse();
});
$route->registerRoute();
