minor fixes

This commit is contained in:
shimon
2023-01-09 15:54:52 +02:00
parent 20c3c10152
commit 93a5a3d1db
4 changed files with 12 additions and 18 deletions
+2 -2
View File
@@ -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
View File
@@ -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) {
+1
View File
@@ -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
+1 -1
View File
@@ -17,7 +17,7 @@ class AbuseTest extends Scope
use ProjectCustom;
use SideNone;
protected function setUp(): void
public function setUp(): void
{
parent::setUp();