Add service for drive hub. #722

This commit is contained in:
Korina Cordero 2022-12-14 09:37:59 +00:00
parent 524d99db08
commit ae8b7be04b
2 changed files with 28 additions and 0 deletions

View file

@ -328,3 +328,9 @@ services:
App\Service\WarrantySerialLoadLogger: App\Service\WarrantySerialLoadLogger:
arguments: arguments:
$em: "@doctrine.orm.entity_manager" $em: "@doctrine.orm.entity_manager"
# drive hub manager
App\Service\DriveHubManager:
arguments:
$em: "@doctrine.orm.entity_manager"
$callback_url: "%env(DRIVEHUB_CALLBACK_URL)%"

View file

@ -0,0 +1,22 @@
<?php
namespace App\Service;
use Doctrine\ORM\EntityManagerInterface;
class DriveHubManager
{
protected $em;
protected $callback_url;
public function __construct(EntityManagerInterface $em, $callback_url)
{
$this->em = $em;
$this->callback_url = $callback_url;
}
public function sendJOStatusChange()
{
// send status back to callback url as POST in json format
}
}