mirror of
https://github.com/pterodactyl/panel.git
synced 2024-11-23 01:22:30 +01:00
Update routes to reflect daemon changes
This commit is contained in:
parent
9c7b753576
commit
8330e26b39
@ -172,11 +172,11 @@ class ServerController extends Controller
|
||||
|
||||
$download->token = (string) Uuid::generate(4);
|
||||
$download->server = $server->uuid;
|
||||
$download->path = str_replace('../', '', $file);
|
||||
$download->path = $file;
|
||||
|
||||
$download->save();
|
||||
|
||||
return redirect( $node->scheme . '://' . $node->fqdn . ':' . $node->daemonListen . '/server/download/' . $download->token);
|
||||
return redirect( $node->scheme . '://' . $node->fqdn . ':' . $node->daemonListen . '/server/file/download/' . $download->token);
|
||||
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ class FileRepository
|
||||
|
||||
$file->dirname = (in_array($file->dirname, ['.', './', '/'])) ? null : trim($file->dirname, '/') . '/';
|
||||
|
||||
$res = $this->client->request('GET', '/server/files/stat/' . rawurlencode($file->dirname.$file->basename) , [
|
||||
$res = $this->client->request('GET', '/server/file/stat/' . rawurlencode($file->dirname.$file->basename) , [
|
||||
'headers' => $this->headers
|
||||
]);
|
||||
|
||||
@ -115,7 +115,7 @@ class FileRepository
|
||||
throw new DisplayException('That file is too large to open in the browser, consider using a SFTP client.');
|
||||
}
|
||||
|
||||
$res = $this->client->request('GET', '/server/file/' . rawurlencode($file->dirname.$file->basename) , [
|
||||
$res = $this->client->request('GET', '/server/file/f/' . rawurlencode($file->dirname.$file->basename) , [
|
||||
'headers' => $this->headers
|
||||
]);
|
||||
|
||||
@ -149,9 +149,10 @@ class FileRepository
|
||||
|
||||
$file->dirname = (in_array($file->dirname, ['.', './', '/'])) ? null : trim($file->dirname, '/') . '/';
|
||||
|
||||
$res = $this->client->request('POST', '/server/file/' . rawurlencode($file->dirname.$file->basename), [
|
||||
$res = $this->client->request('POST', '/server/file/save', [
|
||||
'headers' => $this->headers,
|
||||
'json' => [
|
||||
'path' => rawurlencode($file->dirname.$file->basename),
|
||||
'content' => $content
|
||||
]
|
||||
]);
|
||||
|
Loading…
Reference in New Issue
Block a user