19 lines
488 B
PHP
19 lines
488 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
return static function (AppContext $ctx): void {
|
|
$queue = new BackupQueueService($ctx->settings, $ctx->daUser);
|
|
$root = '/home/' . $ctx->daUser->username();
|
|
|
|
if (FilePicker::handleDirList($ctx, $queue, $root)) {
|
|
return;
|
|
}
|
|
if (FilePicker::handleDirCreate($ctx, $root, $ctx->daUser->username())) {
|
|
return;
|
|
}
|
|
|
|
http_response_code(404);
|
|
header('Content-Type: text/plain; charset=UTF-8');
|
|
echo 'Not Found';
|
|
};
|