Review fixes
This commit is contained in:
parent
5870e6367c
commit
813e9135c6
3 changed files with 8 additions and 10 deletions
|
@ -1056,9 +1056,9 @@ App::post('/v1/projects/:projectId/platforms')
|
||||||
$platform = new Document([
|
$platform = new Document([
|
||||||
'$id' => ID::unique(),
|
'$id' => ID::unique(),
|
||||||
'$permissions' => [
|
'$permissions' => [
|
||||||
'read(any)',
|
Permission::read(Role::any()),
|
||||||
'update(any)',
|
Permission::update(Role::any()),
|
||||||
'delete(any)',
|
Permission::delete(Role::any()),
|
||||||
],
|
],
|
||||||
'projectInternalId' => $project->getInternalId(),
|
'projectInternalId' => $project->getInternalId(),
|
||||||
'projectId' => $project->getId(),
|
'projectId' => $project->getId(),
|
||||||
|
@ -1272,9 +1272,9 @@ App::post('/v1/projects/:projectId/domains')
|
||||||
$domain = new Document([
|
$domain = new Document([
|
||||||
'$id' => ID::unique(),
|
'$id' => ID::unique(),
|
||||||
'$permissions' => [
|
'$permissions' => [
|
||||||
'read(any)',
|
Permission::read(Role::any()),
|
||||||
'update(any)',
|
Permission::update(Role::any()),
|
||||||
'delete(any)',
|
Permission::delete(Role::any()),
|
||||||
],
|
],
|
||||||
'projectInternalId' => $project->getInternalId(),
|
'projectInternalId' => $project->getInternalId(),
|
||||||
'projectId' => $project->getId(),
|
'projectId' => $project->getId(),
|
||||||
|
|
|
@ -469,9 +469,7 @@ App::post('/v1/storage/buckets/:bucketId/files')
|
||||||
$path = $deviceFiles->getPath($fileId . '.' . \pathinfo($fileName, PATHINFO_EXTENSION));
|
$path = $deviceFiles->getPath($fileId . '.' . \pathinfo($fileName, PATHINFO_EXTENSION));
|
||||||
$path = str_ireplace($deviceFiles->getRoot(), $deviceFiles->getRoot() . DIRECTORY_SEPARATOR . $bucket->getId(), $path); // Add bucket id to path after root
|
$path = str_ireplace($deviceFiles->getRoot(), $deviceFiles->getRoot() . DIRECTORY_SEPARATOR . $bucket->getId(), $path); // Add bucket id to path after root
|
||||||
|
|
||||||
$file = Authorization::skip(function () use ($dbForProject, $bucket, $fileId) {
|
$file = $dbForProject->getDocument('bucket_' . $bucket->getInternalId(), $fileId);
|
||||||
return $dbForProject->getDocument('bucket_' . $bucket->getInternalId(), $fileId);
|
|
||||||
});
|
|
||||||
|
|
||||||
$metadata = ['content_type' => $deviceLocal->getFileMimeType($fileTmpName)];
|
$metadata = ['content_type' => $deviceLocal->getFileMimeType($fileTmpName)];
|
||||||
if (!$file->isEmpty()) {
|
if (!$file->isEmpty()) {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
</extensions>
|
</extensions>
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="unit">
|
<testsuite name="unit">
|
||||||
<directory>./tests/unit</directory>
|
<directory>./tests/unit/</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="e2e">
|
<testsuite name="e2e">
|
||||||
<file>./tests/e2e/Client.php</file>
|
<file>./tests/e2e/Client.php</file>
|
||||||
|
|
Loading…
Reference in a new issue