From 2bdf25ca596d2def38c2c437195d58c62461e31c Mon Sep 17 00:00:00 2001 From: "Jokob @NetAlertX" <96159884+jokob-sk@users.noreply.github.com> Date: Sun, 11 Jan 2026 03:18:24 +0000 Subject: [PATCH] FE: refactor API call in restartBackend function to use dynamic URL and token --- front/js/common.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/front/js/common.js b/front/js/common.js index 0af6478a..e4e810e2 100755 --- a/front/js/common.js +++ b/front/js/common.js @@ -1586,12 +1586,16 @@ function restartBackend() { modalEventStatusId = 'modal-message-front-event' + const apiToken = getSetting("API_TOKEN"); + const apiBaseUrl = getApiBase(); + const url = `${apiBaseUrl}/logs/add-to-execution-queue`; + // Execute $.ajax({ method: "POST", - url: "/logs/add-to-execution-queue", + url: url, headers: { - "Authorization": "Bearer " + getSetting("API_TOKEN"), + "Authorization": "Bearer " + apiToken, "Content-Type": "application/json" }, data: JSON.stringify({ action: `${getGuid()}|cron_restart_backend` }),