use blade as conmmands template (#444)

* use blade as conmmands template

* fix lint

* fix ssl
This commit is contained in:
Saeed Vaziry
2025-01-27 21:27:58 +01:00
committed by GitHub
parent a73476c1dd
commit cdbde063f0
208 changed files with 1080 additions and 1012 deletions

View File

@ -3,17 +3,18 @@
namespace App\SSH\Storage;
use App\Exceptions\SSHCommandError;
use App\SSH\HasScripts;
use App\Exceptions\SSHError;
use Illuminate\Support\Facades\Log;
class Dropbox extends AbstractStorage
{
use HasScripts;
/**
* @throws SSHError
*/
public function upload(string $src, string $dest): array
{
$upload = $this->server->ssh()->exec(
$this->getScript('dropbox/upload.sh', [
view('ssh.storage.dropbox.upload', [
'src' => $src,
'dest' => $dest,
'token' => $this->storageProvider->credentials['token'],
@ -33,10 +34,13 @@ public function upload(string $src, string $dest): array
];
}
/**
* @throws SSHError
*/
public function download(string $src, string $dest): void
{
$this->server->ssh()->exec(
$this->getScript('dropbox/download.sh', [
view('ssh.storage.dropbox.download', [
'src' => $src,
'dest' => $dest,
'token' => $this->storageProvider->credentials['token'],
@ -45,10 +49,13 @@ public function download(string $src, string $dest): void
);
}
/**
* @throws SSHError
*/
public function delete(string $src): void
{
$this->server->ssh()->exec(
$this->getScript('dropbox/delete-file.sh', [
view('ssh.storage.dropbox.delete-file', [
'src' => $src,
'token' => $this->storageProvider->credentials['token'],
]),