This commit is contained in:
Khushboo Verma committed 2024-03-11 15:51:19 +01:00
1 parent f482d96225
commit c2bdbbe1ec
10 files changed
+80 -16

No files matched your search

+6 -1
View File
@@ -38,14 +38,19 @@ use Utopia\Validator\Range;
use Utopia\Validator\Text;
use Utopia\Validator\URL;
use Utopia\Validator\WhiteList;
use Utopia\Logger\Log;
App::init()
->groups(['projects'])
->inject('project')
->action(function (Document $project) {
->inject('startTime')
->inject('log')
->action(function (Document $project, float $startTime, Log $log) {
$log->addExtra('projectInitStart', \strval(\microtime(true)));
if ($project->getId() !== 'console') {
throw new Exception(Exception::GENERAL_ACCESS_FORBIDDEN);
}
$log->addExtra('projectInitEnd', \strval(\microtime(true)));
});
App::post('/v1/projects')