closes #85, also fixes route names
This commit is contained in:
parent
9fb0cb420e
commit
e0bff4db8e
3 changed files with 6 additions and 6 deletions
|
@ -143,7 +143,7 @@ class ServerController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
Alert::danger($exception)->flash();
|
Alert::danger($exception)->flash();
|
||||||
return redirect()->route('files.index', $uuid);
|
return redirect()->route('server.files.index', $uuid);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,22 +60,22 @@ class ServerRoutes {
|
||||||
|
|
||||||
// File Manager Routes
|
// File Manager Routes
|
||||||
$router->get('/files', [
|
$router->get('/files', [
|
||||||
'as' => 'files.index',
|
'as' => 'server.files.index',
|
||||||
'uses' => 'Server\ServerController@getFiles'
|
'uses' => 'Server\ServerController@getFiles'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$router->get('/files/edit/{file}', [
|
$router->get('/files/edit/{file}', [
|
||||||
'as' => 'files.edit',
|
'as' => 'server.files.edit',
|
||||||
'uses' => 'Server\ServerController@getEditFile'
|
'uses' => 'Server\ServerController@getEditFile'
|
||||||
])->where('file', '.*');
|
])->where('file', '.*');
|
||||||
|
|
||||||
$router->get('/files/download/{file}', [
|
$router->get('/files/download/{file}', [
|
||||||
'as' => 'files.download',
|
'as' => 'server.files.download',
|
||||||
'uses' => 'Server\ServerController@getDownloadFile'
|
'uses' => 'Server\ServerController@getDownloadFile'
|
||||||
])->where('file', '.*');
|
])->where('file', '.*');
|
||||||
|
|
||||||
$router->get('/files/add', [
|
$router->get('/files/add', [
|
||||||
'as' => 'files.add',
|
'as' => 'server.files.add',
|
||||||
'uses' => 'Server\ServerController@getAddFile'
|
'uses' => 'Server\ServerController@getAddFile'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
@ -186,7 +186,7 @@ $(window).load(function () {
|
||||||
$("#create_file").append(' <i class="fa fa-spinner fa fa-spin"></i>').addClass("disabled");
|
$("#create_file").append(' <i class="fa fa-spinner fa fa-spin"></i>').addClass("disabled");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: '/server/{{ $server->uuidShort }}/ajax/files/save',
|
url: '{{ route('server.files.save', $server->uuidShort) }}',
|
||||||
headers: { 'X-CSRF-Token': '{{ csrf_token() }}' },
|
headers: { 'X-CSRF-Token': '{{ csrf_token() }}' },
|
||||||
data: {
|
data: {
|
||||||
file: '{{ $directory }}' + $('#file_name').val(),
|
file: '{{ $directory }}' + $('#file_name').val(),
|
||||||
|
|
Loading…
Reference in a new issue