mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
use blade as conmmands template (#444)
* use blade as conmmands template * fix lint * fix ssl
This commit is contained in:
@ -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'],
|
||||
]),
|
||||
|
Reference in New Issue
Block a user