From a369d49b2c8ce2e37e1bc9f5bacece4d9c990d51 Mon Sep 17 00:00:00 2001 From: Hemachandar Date: Tue, 10 Feb 2026 20:49:49 +0530 Subject: [PATCH] const --- app/init/constants.php | 2 ++ src/Appwrite/Platform/Modules/VCS/Http/GitHub/Authorize/Get.php | 2 +- src/Appwrite/Platform/Modules/VCS/Http/GitHub/Callback/Get.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/init/constants.php b/app/init/constants.php index 0ee5271d7f..f084359068 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -5,6 +5,8 @@ use Appwrite\Platform\Modules\Compute\Specification; const APP_NAME = 'Appwrite'; const APP_DOMAIN = 'appwrite.io'; +const APP_VIEWS_DIR = __DIR__ . '/../views'; + // Email const APP_EMAIL_TEAM = 'team@localhost.test'; // Default email address const APP_EMAIL_SECURITY = ''; // Default security email address diff --git a/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Authorize/Get.php b/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Authorize/Get.php index f37a731c74..6188c14b5d 100644 --- a/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Authorize/Get.php +++ b/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Authorize/Get.php @@ -31,7 +31,7 @@ class Get extends Action ->desc('Create GitHub app installation') ->groups(['api', 'vcs']) ->label('scope', 'vcs.read') - ->label('error', __DIR__ . '/../../../../../../../../app/views/general/error.phtml') + ->label('error', APP_VIEWS_DIR . '/general/error.phtml') ->label('sdk', new Method( namespace: 'vcs', group: 'installations', diff --git a/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Callback/Get.php b/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Callback/Get.php index 2ea1c53c0f..1212c06a72 100644 --- a/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Callback/Get.php +++ b/src/Appwrite/Platform/Modules/VCS/Http/GitHub/Callback/Get.php @@ -35,7 +35,7 @@ class Get extends Action ->desc('Get installation and authorization from GitHub app') ->groups(['api', 'vcs']) ->label('scope', 'public') - ->label('error', __DIR__ . '/../../../../../../../../app/views/general/error.phtml') + ->label('error', APP_VIEWS_DIR . '/general/error.phtml') ->param('installation_id', '', new Text(256, 0), 'GitHub installation ID', true) ->param('setup_action', '', new Text(256, 0), 'GitHub setup action type', true) ->param('state', '', new Text(2048), 'GitHub state. Contains info sent when starting authorization flow.', true)