From 2510cb9687d265e5e5b538e77ffc8d38887f5d44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Fri, 28 Feb 2025 10:18:06 +0100 Subject: [PATCH] Avoid 404 race condition during screenshot --- app/controllers/general.php | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 132647cd2f..4bf0203abd 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -126,30 +126,6 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw $type = $rule->getAttribute('type', ''); if ($type === 'deployment') { - $method = $utopia->getRoute()?->getLabel('sdk', null); - - if (empty($method)) { - $utopia->getRoute()?->label('sdk', new Method( - namespace: 'functions', - name: 'createExecution', - description: '/docs/references/functions/create-execution.md', - auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_CREATED, - model: Response::MODEL_EXECUTION, - ) - ], - contentType: ContentType::MULTIPART, - requestType: 'application/json', - )); - } else { - /** @var Method $method */ - $method->setNamespace('functions'); - $method->setMethodName('createExecution'); - $utopia->getRoute()?->label('sdk', $method); - } - if (System::getEnv('_APP_OPTIONS_COMPUTE_FORCE_HTTPS', 'disabled') === 'enabled') { // Force HTTPS if ($request->getProtocol() !== 'https' && $request->getHostname() !== APP_HOSTNAME_INTERNAL) { if ($request->getMethod() !== Request::METHOD_GET) {