mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge branch 'fix-github-check-urls' into chore-update-env-var-used-for-domain
This commit is contained in:
@@ -1444,10 +1444,11 @@ class Builds extends Action
|
||||
$hostname = System::getEnv('_APP_CONSOLE_DOMAIN', System::getEnv('_APP_DOMAIN', ''));
|
||||
|
||||
$projectId = $project->getId();
|
||||
$region = $project->getAttribute('region', 'default');
|
||||
$resourceId = $resource->getId();
|
||||
$providerTargetUrl = match ($resource->getCollection()) {
|
||||
'functions' => "{$protocol}://{$hostname}/console/project-{$projectId}/functions/function-{$resourceId}",
|
||||
'sites' => "{$protocol}://{$hostname}/console/project-{$projectId}/sites/site-{$resourceId}",
|
||||
'functions' => "{$protocol}://{$hostname}/console/project-{$region}-{$projectId}/functions/function-{$resourceId}",
|
||||
'sites' => "{$protocol}://{$hostname}/console/project-{$region}-{$projectId}/sites/site-{$resourceId}",
|
||||
default => throw new \Exception('Invalid resource type')
|
||||
};
|
||||
|
||||
|
||||
@@ -219,6 +219,7 @@ class Webhooks extends Action
|
||||
]);
|
||||
|
||||
$projectId = $project->getId();
|
||||
$region = $project->getAttribute('region', 'default');
|
||||
$webhookId = $webhook->getId();
|
||||
|
||||
$template = Template::fromFile(__DIR__ . '/../../../../app/config/locale/templates/email-webhook-failed.tpl');
|
||||
@@ -227,7 +228,7 @@ class Webhooks extends Action
|
||||
$template->setParam('{{project}}', $project->getAttribute('name'));
|
||||
$template->setParam('{{url}}', $webhook->getAttribute('url'));
|
||||
$template->setParam('{{error}}', $curlError ?? 'The server returned ' . $statusCode . ' status code');
|
||||
$template->setParam('{{path}}', "/console/project-$projectId/settings/webhooks/$webhookId");
|
||||
$template->setParam('{{path}}', "/console/project-$region-$projectId/settings/webhooks/$webhookId");
|
||||
$template->setParam('{{attempts}}', $attempts);
|
||||
|
||||
$template->setParam('{{logoUrl}}', $plan['logoUrl'] ?? APP_EMAIL_LOGO_URL);
|
||||
|
||||
Reference in New Issue
Block a user