diff --git a/extensions/Servers/Proxmox/views/components/layout.blade.php b/extensions/Servers/Proxmox/views/components/layout.blade.php index a74b976c0..06ad385f7 100644 --- a/extensions/Servers/Proxmox/views/components/layout.blade.php +++ b/extensions/Servers/Proxmox/views/components/layout.blade.php @@ -1273,7 +1273,7 @@ this.saving = true; this.message = ''; - fetch(`/proxmox/server/${this.serverId}/tags`, { + fetch(`/api/proxmox/tags/${this.serverId}`, { method: 'POST', headers: { 'Content-Type': 'application/json', diff --git a/routes/web.php b/routes/web.php index e80709e56..75941b26e 100644 --- a/routes/web.php +++ b/routes/web.php @@ -16,12 +16,12 @@ use App\Livewire\Tickets; use Illuminate\Foundation\Auth\EmailVerificationRequest; use Illuminate\Support\Facades\Route; -// Server icon API (AJAX, not Livewire) +// Server icon/tag API (AJAX, not Livewire) Route::middleware(['web', 'auth'])->group(function () { Route::get('/proxmox/server/{server}/icon', [ServerIconController::class, 'show']); Route::post('/proxmox/server/{server}/icon', [ServerIconController::class, 'update']); - Route::get('/proxmox/server/{server}/tags', [ServerTagController::class, 'show']); - Route::post('/proxmox/server/{server}/tags', [ServerTagController::class, 'update']); + Route::get('/api/proxmox/tags/{server}', [ServerTagController::class, 'show']); + Route::post('/api/proxmox/tags/{server}', [ServerTagController::class, 'update']); Route::get('/proxmox/tags/colors', [ServerTagController::class, 'colors']); });