Commit cce6c50c authored by Mark Harding's avatar Mark Harding

(chore): single notifications now through cassandra

1 merge request!245(refactor): Deprecate CockroachDB
Pipeline #69157489 pending with stages
......@@ -104,8 +104,8 @@ class CassandraRepository
*/
public function get($urn)
{
list ($to_guid, $uuid) = explode('-', $this->urn->setUrn($urn)->getNss());
list ($to_guid, $uuid) = explode('-', $this->urn->setUrn($urn)->getNss(), 2);
$response = $this->getList([
'to_guid' => $to_guid,
'uuid' => $uuid,
......
......@@ -63,10 +63,13 @@ class Manager
*/
public function getSingle($urn)
{
if (strpos($urn, 'urn:') !== FALSE) {
return $this->cassandraRepository->get($urn);
if (strpos($urn, 'urn:') === FALSE) {
$urn = "urn:notification:" . implode('-', [
$this->user->getGuid(),
$urn
]);
}
return $this->repository->get($urn);
return $this->cassandraRepository->get($urn);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment