summaryrefslogtreecommitdiffstats
path: root/lib/Service
diff options
context:
space:
mode:
authorSean Molenaar <sean@seanmolenaar.eu>2020-12-16 22:30:19 +0100
committerSean Molenaar <SMillerDev@users.noreply.github.com>2020-12-17 10:35:23 +0100
commit11f5904dd58cbcb45e0e3e6c466f187e30323155 (patch)
tree17e7cd35948b161a0e567dec94bb9aecbe64d895 /lib/Service
parent7bebaab86e2676466eb9d104ec1a57cd9634c0b4 (diff)
Fix mapper->find and empty user sessions
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Diffstat (limited to 'lib/Service')
-rw-r--r--lib/Service/Service.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Service/Service.php b/lib/Service/Service.php
index 970613830..597a99647 100644
--- a/lib/Service/Service.php
+++ b/lib/Service/Service.php
@@ -40,8 +40,8 @@ abstract class Service
/**
* Service constructor.
*
- * @param NewsMapperV2 $mapper
- * @param LoggerInterface $logger
+ * @param NewsMapperV2 $mapper
+ * @param LoggerInterface $logger
*/
public function __construct($mapper, LoggerInterface $logger)
{
@@ -97,7 +97,7 @@ abstract class Service
public function find(string $userId, int $id): Entity
{
try {
- return $this->mapper->find($userId, $id);
+ return $this->mapper->findFromUser($userId, $id);
} catch (DoesNotExistException $ex) {
throw new ServiceNotFoundException($ex->getMessage());
} catch (MultipleObjectsReturnedException $ex) {