From 2da2b5bb7fe2423c6f14639d17496bb46daf0151 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 20 Nov 2024 04:25:37 +0000 Subject: [PATCH] reset error hook --- app/controllers/general.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 4bf45f3860..0bbfa2b694 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -702,22 +702,6 @@ App::error() ->inject('log') ->inject('queueForUsage') ->action(function (Throwable $error, App $utopia, Request $request, Response $response, Document $project, ?Logger $logger, Log $log, Usage $queueForUsage) { - /** - * Update project last activity - */ - if (!$project->isEmpty() && $project->getId() !== 'console') { - try { - $accessedAt = $project->getAttribute('accessedAt', ''); - if (DateTime::formatTz(DateTime::addSeconds(new \DateTime(), -APP_PROJECT_ACCESS)) > $accessedAt) { - $project->setAttribute('accessedAt', DateTime::now()); - Authorization::skip(fn () => $dbForConsole->updateDocument('projects', $project->getId(), $project)); - } - } catch (Throwable $th) { - Console::error('[Error] updating project\'s last activity'); - Console::error($th->getMessage()); - } - } - $version = System::getEnv('_APP_VERSION', 'UNKNOWN'); $route = $utopia->getRoute(); $class = \get_class($error);