refactor: use unified provider desing
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -257,7 +257,8 @@ class Store {
|
||||
['tid' => $tenantId, 'uid' => $userId, 'cid' => $cid],
|
||||
['$set' => $data]
|
||||
);
|
||||
return $entity;
|
||||
// return the canonical post-update collection so provider/service and full state are populated
|
||||
return $this->collectionFetch($tenantId, $userId, (string) $cid) ?? $entity;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -501,8 +502,10 @@ class Store {
|
||||
// Chronicle the modification (operation 2)
|
||||
$this->chronicleDocument($tenantId, $collectionId, $identifier, 2);
|
||||
}
|
||||
|
||||
return $entity;
|
||||
|
||||
// return the canonical post-update entity so provider/service and full state are populated
|
||||
$entries = $this->entityFetch($tenantId, $userId, $collectionId, $identifier);
|
||||
return $entries[$identifier] ?? $entity;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user