PR review fixes

This commit is contained in:
Matej Bačo
2025-02-20 16:49:20 +01:00
parent c3df0a71e3
commit 54d877fe3e
4 changed files with 11 additions and 6 deletions
+1 -1
View File
@@ -950,7 +950,7 @@ services:
appwrite-browser:
container_name: appwrite-browser
image: appwrite/browser:0.1.0
image: appwrite/browser:0.2.0
networks:
- appwrite
@@ -741,12 +741,12 @@ class Builds extends Action
'screenshot' => [
'headers' => [ 'x-appwrite-hostname' => $rule->getAttribute('domain') ],
'url' => 'http://traefik/?appwrite-preview=1&appwrite-theme=light',
'color' => 'light'
'theme' => 'light'
],
'screenshotDark' => [
'headers' => [ 'x-appwrite-hostname' => $rule->getAttribute('domain') ],
'url' => 'http://traefik/?appwrite-preview=1&appwrite-theme=dark',
'color' => 'dark'
'theme' => 'dark'
],
];
+7 -2
View File
@@ -99,7 +99,7 @@ class Deletes extends Action
$this->deleteFunction($dbForPlatform, $getProjectDB, $deviceForFunctions, $deviceForBuilds, $certificates, $document, $project);
break;
case DELETE_TYPE_DEPLOYMENTS:
$this->deleteDeployment($dbForPlatform, $getProjectDB, $deviceForFunctions, $deviceForBuilds, $document, $certificates, $project);
$this->deleteDeployment($dbForPlatform, $getProjectDB, $deviceForFunctions, $deviceForBuilds, $deviceForFiles, $document, $certificates, $project);
break;
case DELETE_TYPE_USERS:
$this->deleteUser($getProjectDB, $document, $project);
@@ -1048,7 +1048,7 @@ class Deletes extends Action
* @return void
* @throws Exception
*/
private function deleteDeployment(Database $dbForPlatform, callable $getProjectDB, Device $deviceForFunctions, Device $deviceForBuilds, Document $document, CertificatesAdapter $certificates, Document $project): void
private function deleteDeployment(Database $dbForPlatform, callable $getProjectDB, Device $deviceForFunctions, Device $deviceForBuilds, Device $deviceForFiles, Document $document, CertificatesAdapter $certificates, Document $project): void
{
$projectId = $project->getId();
$dbForProject = $getProjectDB($project);
@@ -1060,6 +1060,11 @@ class Deletes extends Action
*/
$this->deleteDeploymentFiles($deviceForFunctions, $document); //TODO: For sites, this should be deviceForSites
/**
* Delete deployment screenshots
*/
$this->deleteDeploymentScreenshots($deviceForFiles, $dbForPlatform, $document);
/**
* Delete builds
*/
@@ -84,7 +84,7 @@ class Deployment extends Model
])
->addRule('screenshotDark', [
'type' => self::TYPE_STRING,
'description' => 'Screenshot with dark theme prefference file ID.',
'description' => 'Screenshot with dark theme preference file ID.',
'default' => '',
'example' => '5e5ea5c16897e',
])