closes #85, also fixes route names

This commit is contained in:
Dane Everitt 2016-09-07 15:28:57 -04:00
parent 9fb0cb420e
commit e0bff4db8e
3 changed files with 6 additions and 6 deletions

View file

@ -143,7 +143,7 @@ class ServerController extends Controller
}
Alert::danger($exception)->flash();
return redirect()->route('files.index', $uuid);
return redirect()->route('server.files.index', $uuid);
}

View file

@ -60,22 +60,22 @@ class ServerRoutes {
// File Manager Routes
$router->get('/files', [
'as' => 'files.index',
'as' => 'server.files.index',
'uses' => 'Server\ServerController@getFiles'
]);
$router->get('/files/edit/{file}', [
'as' => 'files.edit',
'as' => 'server.files.edit',
'uses' => 'Server\ServerController@getEditFile'
])->where('file', '.*');
$router->get('/files/download/{file}', [
'as' => 'files.download',
'as' => 'server.files.download',
'uses' => 'Server\ServerController@getDownloadFile'
])->where('file', '.*');
$router->get('/files/add', [
'as' => 'files.add',
'as' => 'server.files.add',
'uses' => 'Server\ServerController@getAddFile'
]);

View file

@ -186,7 +186,7 @@ $(window).load(function () {
$("#create_file").append(' <i class="fa fa-spinner fa fa-spin"></i>').addClass("disabled");
$.ajax({
type: 'POST',
url: '/server/{{ $server->uuidShort }}/ajax/files/save',
url: '{{ route('server.files.save', $server->uuidShort) }}',
headers: { 'X-CSRF-Token': '{{ csrf_token() }}' },
data: {
file: '{{ $directory }}' + $('#file_name').val(),