1
0
Fork 0
mirror of synced 2024-09-29 08:51:28 +13:00

fix return

This commit is contained in:
Damodar Lohani 2021-11-14 18:08:45 +05:45
parent 73aea7387c
commit 692cbe1899

View file

@ -710,28 +710,28 @@ App::post('/v1/storage/buckets/:bucketId/files')
'search' => implode(' ', [$fileId, $fileName,]),
]);
if($permissionBucket) {
Authorization::skip(function() use ($dbForInternal, $bucketId, $doc) {
$file = $dbForInternal->createDocument('bucket_' . $bucketId, $doc);
$file = Authorization::skip(function() use ($dbForInternal, $bucketId, $doc) {
return $dbForInternal->createDocument('bucket_' . $bucketId, $doc);
});
} else {
$file = $dbForInternal->createDocument('bucket_' . $bucketId, $doc);
}
} else {
$file = $file
->setAttribute('$read', $read)
->setAttribute('$write', $write)
->setAttribute('signature', $fileHash)
->setAttribute('mimeType', $mimeType)
->setAttribute('sizeActual', $sizeActual)
->setAttribute('algorithm', $algorithm)
->setAttribute('openSSLVersion', $openSSLVersion)
->setAttribute('openSSLCipher', $openSSLCipher)
->setAttribute('openSSLTag', $openSSLTag)
->setAttribute('openSSLIV', $openSSLIV);
->setAttribute('$read', $read)
->setAttribute('$write', $write)
->setAttribute('signature', $fileHash)
->setAttribute('mimeType', $mimeType)
->setAttribute('sizeActual', $sizeActual)
->setAttribute('algorithm', $algorithm)
->setAttribute('openSSLVersion', $openSSLVersion)
->setAttribute('openSSLCipher', $openSSLCipher)
->setAttribute('openSSLTag', $openSSLTag)
->setAttribute('openSSLIV', $openSSLIV);
if($permissionBucket) {
Authorization::skip(function() use ($dbForInternal, $bucketId, $fileId, $file) {
$file = $dbForInternal->updateDocument('bucket_' . $bucketId, $fileId, $file);
$file = Authorization::skip(function() use ($dbForInternal, $bucketId, $fileId, $file) {
return $dbForInternal->updateDocument('bucket_' . $bucketId, $fileId, $file);
});
} else {
$file = $dbForInternal->updateDocument('bucket_' . $bucketId, $fileId, $file);
@ -767,8 +767,8 @@ App::post('/v1/storage/buckets/:bucketId/files')
'search' => implode(' ', [$fileId, $fileName,]),
]);
if($permissionBucket) {
Authorization::skip(function() use ($dbForInternal, $bucketId, $doc) {
$file = $dbForInternal->createDocument('bucket_' . $bucketId, $doc);
$file = Authorization::skip(function() use ($dbForInternal, $bucketId, $doc) {
return $dbForInternal->createDocument('bucket_' . $bucketId, $doc);
});
} else {
$file = $dbForInternal->createDocument('bucket_' . $bucketId, $doc);
@ -778,8 +778,8 @@ App::post('/v1/storage/buckets/:bucketId/files')
->setAttribute('chunksUploaded', $chunksUploaded);
if($permissionBucket) {
Authorization::skip(function() use ($dbForInternal, $bucketId, $fileId, $file) {
$file = $dbForInternal->updateDocument('bucket_' . $bucketId, $fileId, $file);
$file = Authorization::skip(function() use ($dbForInternal, $bucketId, $fileId, $file) {
return $dbForInternal->updateDocument('bucket_' . $bucketId, $fileId, $file);
});
} else {
$file = $dbForInternal->updateDocument('bucket_' . $bucketId, $fileId, $file);