Добавил коментарии. Удрал зависимость от домена в JS

This commit is contained in:
2026-09-28 19:59:26 +07:00
parent 344391a5b2
commit a034489e99
5 changed files with 24 additions and 6 deletions
+5 -5
View File
@@ -3,7 +3,7 @@ async function ap_update()
const ssid = document.querySelector('#ap-ssid');
const pass = document.querySelector('#ap-password');
const response = await fetch("http://192.168.4.1/settings/ap_update", {
const response = await fetch("/settings/ap_update", {
method: "POST",
headers: {
'Content-Type': 'application/json;charset=utf-8'
@@ -19,7 +19,7 @@ async function sta_update()
const ssid = document.querySelector('#sta-ssid');
const pass = document.querySelector('#sta-password');
const response = await fetch("http://192.168.4.1/settings/sta_update", {
const response = await fetch("/settings/sta_update", {
method: "POST",
headers: {
'Content-Type': 'application/json;charset=utf-8'
@@ -41,7 +41,7 @@ async function admin_update()
return;
}
const res = await fetch("http://192.168.4.1/settings/admin_update", {
const res = await fetch("/settings/admin_update", {
method: "POST",
headers:{
'Content-Type': 'application/json;charset=utf-8'
@@ -57,7 +57,7 @@ async function set_conn_out()
{
const checkbox = document.getElementById('connection-out');
const response = await fetch("http://192.168.4.1/settings/set_conn_out", {
const response = await fetch("/settings/set_conn_out", {
method: "POST",
headers: {
'Content-Type': 'application/json;charset=utf-8'
@@ -72,7 +72,7 @@ async function set_conn_out()
async function init()
{
try {
const res = await fetch("http://192.168.4.1/settings/is_conn_out", {
const res = await fetch("h/settings/is_conn_out", {
method: "GET"
});