From 22deb883c15e2d4831a7a4a4e44c7cd5e643e728 Mon Sep 17 00:00:00 2001 From: Binyamin Yawitz <316103+byawitz@users.noreply.github.com> Date: Mon, 12 Aug 2024 15:59:42 -0400 Subject: [PATCH] refactor: console links --- app/controllers/api/account.php | 6 +++--- app/controllers/api/vcs.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index e2d6788f96..8e5b606619 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -55,8 +55,8 @@ use Utopia\Validator\Text; use Utopia\Validator\URL; use Utopia\Validator\WhiteList; -$oauthDefaultSuccess = '/auth/oauth2/success'; -$oauthDefaultFailure = '/auth/oauth2/failure'; +$oauthDefaultSuccess = '/console/auth/oauth2/success'; +$oauthDefaultFailure = '/console/auth/oauth2/failure'; function sendSessionAlert(Locale $locale, Document $user, Document $project, Document $session, Mail $queueForMails) { @@ -1874,7 +1874,7 @@ App::post('/v1/account/tokens/magic-url') $dbForProject->purgeCachedDocument('users', $user->getId()); if (empty($url)) { - $url = $request->getProtocol() . '://' . $request->getHostname() . '/auth/magic-url'; + $url = $request->getProtocol() . '://' . $request->getHostname() . '/console/auth/magic-url'; } $url = Template::parseURL($url); diff --git a/app/controllers/api/vcs.php b/app/controllers/api/vcs.php index cc5504753e..299e2836f7 100644 --- a/app/controllers/api/vcs.php +++ b/app/controllers/api/vcs.php @@ -96,7 +96,7 @@ $createGitDeployments = function (GitHub $github, string $providerInstallationId $commentStatus = $isAuthorized ? 'waiting' : 'failed'; - $authorizeUrl = $request->getProtocol() . '://' . $request->getHostname() . "/git/authorize-contributor?projectId={$projectId}&installationId={$installationId}&repositoryId={$repositoryId}&providerPullRequestId={$providerPullRequestId}"; + $authorizeUrl = $request->getProtocol() . '://' . $request->getHostname() . "/console/git/authorize-contributor?projectId={$projectId}&installationId={$installationId}&repositoryId={$repositoryId}&providerPullRequestId={$providerPullRequestId}"; $action = $isAuthorized ? ['type' => 'logs'] : ['type' => 'authorize', 'url' => $authorizeUrl];