summaryrefslogtreecommitdiffstats
path: root/lib/Controller/RecordingController.php
diff options
context:
space:
mode:
authorVitor Mattos <vitor@php.rio>2023-01-04 16:02:27 -0300
committerVitor Mattos <vitor@php.rio>2023-01-04 16:02:27 -0300
commitd96fb4431b1d556f8027788ce3c0ad4cf8125cc0 (patch)
tree56d873749d040e31ee0c179caaebf593f16c4b78 /lib/Controller/RecordingController.php
parentff782dbfde14a263d73de87641989ccb15c396cf (diff)
Move methods of Recording from RoomService to RecordingService
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'lib/Controller/RecordingController.php')
-rw-r--r--lib/Controller/RecordingController.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/Controller/RecordingController.php b/lib/Controller/RecordingController.php
index e87b909d9..20cf685e1 100644
--- a/lib/Controller/RecordingController.php
+++ b/lib/Controller/RecordingController.php
@@ -29,7 +29,6 @@ use InvalidArgumentException;
use OCA\Talk\Config;
use OCA\Talk\Exceptions\UnauthorizedException;
use OCA\Talk\Service\RecordingService;
-use OCA\Talk\Service\RoomService;
use OCA\Talk\Service\SIPBridgeService;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
@@ -39,20 +38,17 @@ class RecordingController extends AEnvironmentAwareController {
private Config $talkConfig;
private SIPBridgeService $SIPBridgeService;
private RecordingService $recordingService;
- private RoomService $roomService;
public function __construct(string $appName,
IRequest $request,
Config $talkConfig,
SIPBridgeService $SIPBridgeService,
- RecordingService $recordingService,
- RoomService $roomService) {
+ RecordingService $recordingService) {
parent::__construct($appName, $request);
$this->talkConfig = $talkConfig;
$this->SIPBridgeService = $SIPBridgeService;
$this->recordingService = $recordingService;
- $this->roomService = $roomService;
}
/**
@@ -61,7 +57,7 @@ class RecordingController extends AEnvironmentAwareController {
*/
public function startRecording(int $status): DataResponse {
try {
- $this->roomService->startRecording($this->room, $status);
+ $this->recordingService->startRecording($this->room, $status);
} catch (InvalidArgumentException $e) {
return new DataResponse(['error' => $e->getMessage()], Http::STATUS_BAD_REQUEST);
}
@@ -74,7 +70,7 @@ class RecordingController extends AEnvironmentAwareController {
*/
public function stopRecording(): DataResponse {
try {
- $this->roomService->stopRecording($this->room);
+ $this->recordingService->stopRecording($this->room);
} catch (InvalidArgumentException $e) {
return new DataResponse(['error' => $e->getMessage()], Http::STATUS_BAD_REQUEST);
}