Добавил коментарии. Удрал зависимость от домена в JS
This commit is contained in:
+1
-1
@@ -18,7 +18,7 @@ function add_user(ip, mac)
|
||||
|
||||
async function update_user_list()
|
||||
{
|
||||
const res = await fetch("http://192.168.4.1/user_list", {
|
||||
const res = await fetch("/user_list", {
|
||||
method: "GET"
|
||||
});
|
||||
|
||||
|
||||
+5
-5
@@ -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"
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user