1
0
Fork 0
mirror of synced 2024-06-03 03:14:50 +12:00

sync with 0.16

This commit is contained in:
shimon 2022-08-17 17:29:22 +03:00
parent cc9a166146
commit 9fc2e4c3a5
3 changed files with 9 additions and 9 deletions

View file

@ -1353,15 +1353,13 @@ App::delete('/v1/storage/buckets/:bucketId/files/:fileId')
->param('bucketId', null, new UID(), 'Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).')
->param('fileId', '', new UID(), 'File ID.')
->inject('response')
->inject('request')
->inject('dbForProject')
->inject('events')
->inject('usage')
->inject('mode')
->inject('deviceFiles')
->inject('project')
->inject('deletes')
->action(function (string $bucketId, string $fileId, Response $response, Database $dbForProject, Event $events, Stats $usage, string $mode, Device $deviceFiles, Document $project, Delete $deletes) {
->action(function (string $bucketId, string $fileId, Response $response, Database $dbForProject, Event $events, Stats $usage, string $mode, Device $deviceFiles, Delete $deletes) {
$bucket = Authorization::skip(fn () => $dbForProject->getDocument('buckets', $bucketId));
if (

View file

@ -69,7 +69,7 @@ App::init()
throw new Exception(Exception::PROJECT_UNKNOWN);
}
/*
/**
* Abuse Check
*/
$abuseKeyLabel = $route->getLabel('abuse-key', 'url:{url},ip:{ip}');
@ -308,6 +308,9 @@ App::shutdown()
$requestParams = $route->getParamsValues();
$user = $audits->getUser();
/**
* Audit labels
*/
$pattern = $route->getLabel('audits.resource', null);
if (!empty($pattern)) {
$resource = $parseLabel($pattern, $responsePayload, $requestParams, $user);
@ -347,10 +350,9 @@ App::shutdown()
$database->trigger();
}
$route = $utopia->match($request);
$requestParams = $route->getParamsValues();
$user = $audits->getUser();
/**
* Cache label
*/
$useCache = $route->getLabel('cache', false);
if ($useCache) {
$resource = null;

View file

@ -138,7 +138,7 @@ class DeletesV1 extends Worker
protected function deleteCacheByTimestamp(): void
{
$this->deleteCacheFiles([
new Query('accessedAt', Query::TYPE_LESSER, [$this->args['timestamp']])
new Query('accessedAt', Query::TYPE_LESSER, [$this->args['timestamp']])
]);
}