mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
minor fixes
This commit is contained in:
@@ -33,7 +33,7 @@ App::post('/v1/edge/sync')
|
||||
->desc('Purge cache keys')
|
||||
->groups(['edge'])
|
||||
->label('scope', 'public')
|
||||
->param('keys', '', new ArrayList(new Text(4056), 600), 'Cache keys. an array containing alphanumerical cache keys')
|
||||
->param('keys', '', new ArrayList(new Text(9012), 600), 'Cache keys. an array containing alphanumerical cache keys')
|
||||
->inject('request')
|
||||
->inject('response')
|
||||
->inject('queueForEdgeSyncIn')
|
||||
@@ -42,7 +42,7 @@ App::post('/v1/edge/sync')
|
||||
if (empty($keys)) {
|
||||
throw new Exception(Exception::KEY_NOT_FOUND);
|
||||
}
|
||||
|
||||
var_dump($keys);
|
||||
foreach ($keys as $parts) {
|
||||
$key = json_decode($parts);
|
||||
$queueForEdgeSyncIn
|
||||
|
||||
+8
-15
@@ -1158,21 +1158,14 @@ function getDevice($root): Device
|
||||
Console::error($e->getMessage() . 'Invalid DSN. Defaulting to Local device.');
|
||||
}
|
||||
|
||||
switch ($device) {
|
||||
case Storage::DEVICE_S3:
|
||||
return new S3($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
||||
case STORAGE::DEVICE_DO_SPACES:
|
||||
return new DOSpaces($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
||||
case Storage::DEVICE_BACKBLAZE:
|
||||
return new Backblaze($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
||||
case Storage::DEVICE_LINODE:
|
||||
return new Linode($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
||||
case Storage::DEVICE_WASABI:
|
||||
return new Wasabi($root, $accessKey, $accessSecret, $bucket, $region, $acl);
|
||||
case Storage::DEVICE_LOCAL:
|
||||
default:
|
||||
return new Local($root);
|
||||
}
|
||||
return match ($device) {
|
||||
Storage::DEVICE_S3 => new S3($root, $accessKey, $accessSecret, $bucket, $region, $acl),
|
||||
STORAGE::DEVICE_DO_SPACES => new DOSpaces($root, $accessKey, $accessSecret, $bucket, $region, $acl),
|
||||
Storage::DEVICE_BACKBLAZE => new Backblaze($root, $accessKey, $accessSecret, $bucket, $region, $acl),
|
||||
Storage::DEVICE_LINODE => new Linode($root, $accessKey, $accessSecret, $bucket, $region, $acl),
|
||||
Storage::DEVICE_WASABI => new Wasabi($root, $accessKey, $accessSecret, $bucket, $region, $acl),
|
||||
default => new Local($root),
|
||||
};
|
||||
}
|
||||
|
||||
App::setResource('mode', function ($request) {
|
||||
|
||||
@@ -44,6 +44,7 @@ function call(string $url, string $token, array $data): int
|
||||
$delimiter = '-------------' . $boundary;
|
||||
$payload = '';
|
||||
$eol = "\r\n";
|
||||
var_dump($data);
|
||||
foreach ($data as $keys) {
|
||||
$payload .= "--" . $delimiter . $eol
|
||||
. 'Content-Disposition: form-data; name="keys[]"' . $eol . $eol
|
||||
|
||||
@@ -17,7 +17,7 @@ class AbuseTest extends Scope
|
||||
use ProjectCustom;
|
||||
use SideNone;
|
||||
|
||||
protected function setUp(): void
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user