From 466cad2b4143e86fb59e67bdd4fecba2a7a7b3ed Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 5 Mar 2025 06:47:09 +0000 Subject: [PATCH] dbForLogs resource --- app/init.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/init.php b/app/init.php index 1311a1429f..3c39948173 100644 --- a/app/init.php +++ b/app/init.php @@ -1561,6 +1561,10 @@ App::setResource('getProjectDB', function (Group $pools, Database $dbForPlatform }; }, ['pools', 'dbForPlatform', 'cache']); +App::setResource('dbForLogs', function (Document $project, callable $getLogsDB) { + return call_user_func($getLogsDB, $project); +}, ['project', 'getLogsDB']); + App::setResource('getLogsDB', function (Group $pools, Cache $cache) { $database = null; return function (?Document $project = null) use ($pools, $cache, $database) {