1
0
Fork 0
mirror of synced 2024-06-02 19:04:49 +12:00

Updated deletes worker

This commit is contained in:
Eldad Fux 2021-06-12 13:07:26 +03:00
parent 5fa2a8468e
commit 034a01af10

View file

@ -32,14 +32,15 @@ class DeletesV1
public function perform()
{
$projectId = isset($this->args['projectId']) ? $this->args['projectId'] : '';
$type = $this->args['type'];
$projectId = $this->args['projectId'] ?? '';
$type = $this->args['type'] ?? '';
switch (strval($type)) {
case DELETE_TYPE_DOCUMENT:
$document = $this->args['document'];
$document = $this->args['document'] ?? '';
$document = new Document($document);
switch (strval($document->getCollection())) {
switch ($document->getCollection()) {
case Database::SYSTEM_COLLECTION_PROJECTS:
$this->deleteProject($document);
break;
@ -78,7 +79,6 @@ class DeletesV1
default:
Console::error('No delete operation for type: '.$type);
break;
}
}