From 50dff066d0e875f16f5ae5da68b4a235adf0a868 Mon Sep 17 00:00:00 2001 From: osaajani <> Date: Tue, 22 Oct 2024 15:08:58 +0200 Subject: [PATCH] Remove api key from query for sms status, we dont need it as api also support auth by php session --- templates/stat/sms-status.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/templates/stat/sms-status.php b/templates/stat/sms-status.php index fcff7dc..b26fee5 100644 --- a/templates/stat/sms-status.php +++ b/templates/stat/sms-status.php @@ -81,15 +81,11 @@ const formatedEndDate = endDate.toISOString().split('T')[0] const id_phone = document.getElementById('id_phone').value; - const query_infos = \descartes\Router::url('Api', 'get_sms_status_stats'), 'api_key' => $_SESSION['user']['api_key']])?>; + const query_infos = \descartes\Router::url('Api', 'get_sms_status_stats')])?>; let url = `${query_infos.url}?start=${formatedStartDate}&end=${formatedEndDate}`; url += id_phone ? `&id_phone=${id_phone}` : ''; - const response = await fetch(url, { - headers: { - 'X-Api-Key': query_infos.api_key - } - }); + const response = await fetch(url); const data = (await response.json()).response; // Get all dates to avoid holes in data