aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Upload/CleanupService.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/Upload/CleanupService.php')
-rw-r--r--apps/dav/lib/Upload/CleanupService.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/apps/dav/lib/Upload/CleanupService.php b/apps/dav/lib/Upload/CleanupService.php
index 36b75280504..ffa6bad533c 100644
--- a/apps/dav/lib/Upload/CleanupService.php
+++ b/apps/dav/lib/Upload/CleanupService.php
@@ -10,20 +10,18 @@ namespace OCA\DAV\Upload;
use OCA\DAV\BackgroundJob\UploadCleanup;
use OCP\BackgroundJob\IJobList;
-use OCP\IUserSession;
class CleanupService {
public function __construct(
- private IUserSession $userSession,
private IJobList $jobList,
) {
}
- public function addJob(string $folder) {
- $this->jobList->add(UploadCleanup::class, ['uid' => $this->userSession->getUser()->getUID(), 'folder' => $folder]);
+ public function addJob(string $uid, string $folder) {
+ $this->jobList->add(UploadCleanup::class, ['uid' => $uid, 'folder' => $folder]);
}
- public function removeJob(string $folder) {
- $this->jobList->remove(UploadCleanup::class, ['uid' => $this->userSession->getUser()->getUID(), 'folder' => $folder]);
+ public function removeJob(string $uid, string $folder) {
+ $this->jobList->remove(UploadCleanup::class, ['uid' => $uid, 'folder' => $folder]);
}
}