summaryrefslogtreecommitdiffstats
path: root/lib/Controller/RecordingController.php
diff options
context:
space:
mode:
authorVitor Mattos <vitor@php.rio>2022-12-27 17:48:37 -0300
committerVitor Mattos <vitor@php.rio>2022-12-27 18:27:57 -0300
commit31b4ce14408be5872615bb51dc5113f5f604973a (patch)
treecb0f3f062e80965662069e7318d81cc4637ff2e8 /lib/Controller/RecordingController.php
parente1a635017eb0e8a0cd87ec51a1994c29f6c0c8ad (diff)
Moved store to RecordingService
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'lib/Controller/RecordingController.php')
-rw-r--r--lib/Controller/RecordingController.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Controller/RecordingController.php b/lib/Controller/RecordingController.php
index 07cd285ae..768554f9a 100644
--- a/lib/Controller/RecordingController.php
+++ b/lib/Controller/RecordingController.php
@@ -28,6 +28,7 @@ namespace OCA\Talk\Controller;
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;
@@ -39,6 +40,7 @@ class RecordingController extends AEnvironmentAwareController {
private Config $talkConfig;
private IRootFolder $rootFolder;
private SIPBridgeService $SIPBridgeService;
+ private RecordingService $recordingService;
private RoomService $roomService;
@@ -47,11 +49,13 @@ class RecordingController extends AEnvironmentAwareController {
Config $talkConfig,
IRootFolder $rootFolder,
SIPBridgeService $SIPBridgeService,
+ RecordingService $recordingService,
RoomService $roomService) {
parent::__construct($appName, $request);
$this->talkConfig = $talkConfig;
$this->rootFolder = $rootFolder;
$this->SIPBridgeService = $SIPBridgeService;
+ $this->recordingService = $recordingService;
$this->roomService = $roomService;
}
@@ -104,7 +108,7 @@ class RecordingController extends AEnvironmentAwareController {
try {
$file = $this->request->getUploadedFile('file');
- $this->roomService->storeRecording($this->getRoom(), $owner, $file, $this->rootFolder);
+ $this->recordingService->store($this->getRoom(), $owner, $file, $this->rootFolder);
} catch (InvalidArgumentException $e) {
return new DataResponse(['error' => $e->getMessage()], Http::STATUS_BAD_REQUEST);
}