diff --git a/resources/views/mylinkspao.blade.php b/resources/views/mylinkspao.blade.php index 1bbcdb8f..40f3971b 100644 --- a/resources/views/mylinkspao.blade.php +++ b/resources/views/mylinkspao.blade.php @@ -36,13 +36,14 @@

Links

- + +


- + @@ -59,18 +60,21 @@ buttons.forEach(button => button.addEventListener('click', handleButtonClick)); function handleButtonClick(event) { - const action = event.target.dataset.action; + let action = event.target.dataset.action; let id = '0'; try { id = form.querySelector('input[name="id"]').value; - } catch (e) { - id = 0; + if (!action) { + action = form.querySelector('input[name="action"]').value; + } + } catch (e) { + id = 0; } if (!id) { id = 0; } - + loading.style.display = 'block'; // Mostra la clessidra let baseUrl = window.location.href; @@ -85,4 +89,5 @@ } - + + \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index bc208124..b70b0bb1 100644 --- a/routes/web.php +++ b/routes/web.php @@ -6171,10 +6171,12 @@ Route::get('/paolibri', function () { Route::get('/mylinkspao', function (Illuminate\Http\Request $request) { try { $id = $request->query('id'); + $action = $request->query('action'); } catch (\Exception $e) { $id = ''; + $action = ''; } - return view('mylinkspao', ['id' => $id]); + return view('mylinkspao', ['id' => $id, 'action' => $action]); }); Route::get('/handle-article-action-pao/{id}/{action}', function ($id, $action) {