mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix button URL for no active deployments
This commit is contained in:
@@ -152,8 +152,11 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
|
||||
}
|
||||
|
||||
if ($deployment->isEmpty()) {
|
||||
$resourceType = $rule->getAttribute('deploymentResourceType', '');
|
||||
$resourceId = $rule->getAttribute('deploymentResourceId', '');
|
||||
$type = ($resourceType === 'site') ? 'sites' : 'functions';
|
||||
$exception = new AppwriteException(AppwriteException::DEPLOYMENT_NOT_FOUND, view: $errorView);
|
||||
$exception->addCTA('View deployments', $url . '/console'); // TODO: fix this URL
|
||||
$exception->addCTA('View deployments', $url . '/console/project-' . $projectId . '/' . $type . '/' . $resourceType . '-' . $resourceId);
|
||||
throw $exception;
|
||||
}
|
||||
|
||||
@@ -1459,7 +1462,8 @@ App::wildcard()
|
||||
->groups(['api'])
|
||||
->label('scope', 'global')
|
||||
->action(function () {
|
||||
throw new AppwriteException(AppwriteException::GENERAL_ROUTE_NOT_FOUND);
|
||||
$errorView = __DIR__ . '/../views/general/error.phtml';
|
||||
throw new AppwriteException(AppwriteException::GENERAL_ROUTE_NOT_FOUND, view: $errorView);
|
||||
});
|
||||
|
||||
foreach (Config::getParam('services', []) as $service) {
|
||||
|
||||
+1
-1
@@ -205,7 +205,7 @@ services:
|
||||
appwrite-console:
|
||||
<<: *x-logging
|
||||
container_name: appwrite-console
|
||||
image: appwrite/console:5.3.0-sites-rc.35
|
||||
image: appwrite/console:5.3.0-sites-rc.38
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
|
||||
@@ -1655,7 +1655,7 @@ class SitesCustomServerTest extends Scope
|
||||
$response = $proxyClient->call(Client::METHOD_GET, '/');
|
||||
|
||||
$this->assertEquals(404, $response['headers']['status-code']);
|
||||
$this->assertStringContainsString("This domain is not connected to any Appwrite resource yet", $response['body']);
|
||||
$this->assertStringContainsString("This page is empty, but you can make it yours.", $response['body']);
|
||||
|
||||
$site = $this->createSite([
|
||||
'siteId' => ID::unique(),
|
||||
|
||||
Reference in New Issue
Block a user