Skip to content

Commit

Permalink
Merge pull request #7140 from appwrite/fix-delete-installation
Browse files Browse the repository at this point in the history
Fix git installation deletion
  • Loading branch information
abnegate committed Nov 15, 2023
2 parents f6408cd + 2e70ed5 commit 74604a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/api/vcs.php
Original file line number Diff line number Diff line change
Expand Up @@ -1046,8 +1046,8 @@ function (GitHub $github, Request $request, Response $response, Database $dbForC
->inject('response')
->inject('project')
->inject('dbForConsole')
->inject('deletes')
->action(function (string $installationId, Response $response, Document $project, Database $dbForConsole, Delete $deletes) {
->inject('queueForDeletes')
->action(function (string $installationId, Response $response, Document $project, Database $dbForConsole, Delete $queueForDeletes) {
$installation = $dbForConsole->getDocument('installations', $installationId);

if ($installation->isEmpty()) {
Expand All @@ -1058,7 +1058,7 @@ function (GitHub $github, Request $request, Response $response, Database $dbForC
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed to remove installation from DB');
}

$deletes
$queueForDeletes
->setType(DELETE_TYPE_DOCUMENT)
->setDocument($installation);

Expand Down

0 comments on commit 74604a1

Please sign in to comment.