Update all places in the code referencing named routes using JS that doesn't exist now
This commit is contained in:
parent
14b1f13fe0
commit
447c4291ad
20 changed files with 12 additions and 2115 deletions
|
@ -77,7 +77,7 @@
|
|||
}, function () {
|
||||
$.ajax({
|
||||
method: 'DELETE',
|
||||
url: Router.route('admin.api.delete', { identifier: self.data('attr') }),
|
||||
url: '/admin/api/revoke/' + self.data('attr'),
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||
}
|
||||
|
|
|
@ -218,7 +218,7 @@
|
|||
}, function () {
|
||||
$.ajax({
|
||||
method: 'DELETE',
|
||||
url: Router.route('admin.nodes.view.allocation.removeSingle', { node: Pterodactyl.node.id, allocation: allocation }),
|
||||
url: '/admin/nodes/view/' + Pterodactyl.node.id + '/allocation/remove/' + allocation,
|
||||
headers: { 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content') },
|
||||
}).done(function (data) {
|
||||
element.parent().parent().addClass('warning').delay(100).fadeOut();
|
||||
|
@ -247,7 +247,7 @@
|
|||
clearTimeout(fadeTimers[element.data('id')]);
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
url: Router.route('admin.nodes.view.allocation.setAlias', { id: Pterodactyl.node.id }),
|
||||
url: '/admin/nodes/view/' + Pterodactyl.node.id + '/allocation/alias',
|
||||
headers: { 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content') },
|
||||
data: {
|
||||
alias: element.val(),
|
||||
|
@ -321,9 +321,7 @@
|
|||
}, function () {
|
||||
$.ajax({
|
||||
method: 'DELETE',
|
||||
url: Router.route('admin.nodes.view.allocation.removeMultiple', {
|
||||
node: Pterodactyl.node.id
|
||||
}),
|
||||
url: '/admin/nodes/view/' + Pterodactyl.node.id + '/allocations',
|
||||
headers: {'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content')},
|
||||
data: JSON.stringify({
|
||||
allocations: selectedIds
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
|
||||
$.ajax({
|
||||
method: 'GET',
|
||||
url: Router.route('admin.packs.new.template'),
|
||||
url: '/admin/packs/new/template',
|
||||
headers: { 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content') },
|
||||
}).fail(function (jqXhr) {
|
||||
console.error(jqXhr);
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
}, function () {
|
||||
$.ajax({
|
||||
method: 'DELETE',
|
||||
url: Router.route('admin.servers.view.database.delete', { server: '{{ $server->id }}', database: self.data('id') }),
|
||||
url: '/admin/servers/view/{{ $server->id }}/database/' + self.data('id') + '/delete',
|
||||
headers: { 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content') },
|
||||
}).done(function () {
|
||||
self.parent().parent().slideUp();
|
||||
|
@ -152,7 +152,7 @@
|
|||
$(this).addClass('disabled').find('i').addClass('fa-spin');
|
||||
$.ajax({
|
||||
type: 'PATCH',
|
||||
url: Router.route('admin.servers.view.database', { server: '{{ $server->id }}' }),
|
||||
url: '/admin/servers/view/{{ $server->id }}/database',
|
||||
headers: { 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content') },
|
||||
data: { database: $(this).data('id') },
|
||||
}).done(function (data) {
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
<script>
|
||||
$('#pUserId').select2({
|
||||
ajax: {
|
||||
url: Router.route('admin.users.json'),
|
||||
url: '/admin/users/accounts.json',
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
data: function (params) {
|
||||
|
|
|
@ -112,12 +112,12 @@
|
|||
|
||||
@section('footer-scripts')
|
||||
@parent
|
||||
|
||||
|
||||
<script>
|
||||
function saveSettings() {
|
||||
return $.ajax({
|
||||
method: 'PATCH',
|
||||
url: Router.route('admin.settings.mail'),
|
||||
url: '/admin/settings/mail',
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify({
|
||||
'mail:host': $('input[name="mail:host"]').val(),
|
||||
|
@ -146,7 +146,7 @@
|
|||
}, function () {
|
||||
$.ajax({
|
||||
method: 'GET',
|
||||
url: Router.route('admin.settings.mail.test'),
|
||||
url: '/admin/settings/mail/test',
|
||||
headers: { 'X-CSRF-Token': $('input[name="_token"]').val() }
|
||||
}).fail(function (jqXHR) {
|
||||
showErrorDialog(jqXHR, 'test');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue