fix: merge conflicts

Signed-off-by: Luka Trovic <luka@nextcloud.com>
This commit is contained in:
Luka Trovic
2022-12-20 21:34:10 +01:00
parent 67adda5f84
commit 21c4955001
4 changed files with 34 additions and 4 deletions

View File

@@ -26,22 +26,31 @@ namespace OCA\Deck\Controller;
use OCA\Deck\Service\AttachmentService;
use OCP\AppFramework\Controller;
use OCP\IRequest;
use OCA\Deck\Db\AttachmentMapper;
class AttachmentController extends Controller {
/** @var AttachmentService */
private $attachmentService;
private $attachmentMapper;
public function __construct($appName, IRequest $request, AttachmentService $attachmentService) {
public function __construct($appName, IRequest $request, AttachmentService $attachmentService, AttachmentMapper $attachmentMapper) {
parent::__construct($appName, $request);
$this->attachmentService = $attachmentService;
$this->attachmentMapper = $attachmentMapper;
}
/**
* @NoAdminRequired
*/
public function getAll($cardId) {
return $this->attachmentService->findAll($cardId, true);
$attachments = $this->attachmentService->findAll($cardId, true);
foreach ($attachments as &$attachment) {
$this->attachmentMapper->mapOwner($attachment);
}
return $attachments;
}
/**