Update dati2.html

This commit is contained in:
Fabio 2024-11-01 08:05:59 +00:00
parent a1ec1ff866
commit b747ae5fda

View file

@ -26,7 +26,7 @@ function writ() {
} }
function scan() { function scan() {
fetch('http://192.168.1.3:7771/scan', { fetch('http://192.168.1.3:3000/scan', {
method: 'GET', method: 'GET',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
@ -60,7 +60,7 @@ async function azz1() {
} }
function toc() { function toc() {
fetch('http://192.168.1.3:7771/auth/login', { fetch('http://192.168.1.3:3000/auth/login', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
@ -80,7 +80,7 @@ function myPost(json) {
myHeaders.append('Content-Type', 'application/json'); myHeaders.append('Content-Type', 'application/json');
//console.log(myHeaders.get("Content-Type")); //console.log(myHeaders.get("Content-Type"));
//console.log(myHeaders.get("Authorization")); //console.log(myHeaders.get("Authorization"));
fetch('http://192.168.1.3:7771/photos', { fetch('http://192.168.1.3:3000/photos', {
method: 'POST', method: 'POST',
headers: myHeaders, headers: myHeaders,
body: JSON.stringify(json), body: JSON.stringify(json),
@ -92,7 +92,7 @@ function myPost(json) {
function myGet() { function myGet() {
const myHeaders = new Headers(); const myHeaders = new Headers();
myHeaders.append('Authorization', 'Bearer ' + tok); myHeaders.append('Authorization', 'Bearer ' + tok);
fetch('http://192.168.1.3:7771/photos', { fetch('http://192.168.1.3:3000/photos', {
method: 'GET', method: 'GET',
headers: myHeaders, headers: myHeaders,
}) })
@ -110,7 +110,7 @@ function myDel(id) {
myHeaders.append('Content-Type', 'application/json'); myHeaders.append('Content-Type', 'application/json');
//console.log(myHeaders.get("Content-Type")); //console.log(myHeaders.get("Content-Type"));
//console.log(myHeaders.get("Authorization")); //console.log(myHeaders.get("Authorization"));
fetch('http://192.168.1.3:7771/photos/'+id, { fetch('http://192.168.1.3:3000/photos/'+id, {
method: 'DELETE', method: 'DELETE',
headers: myHeaders, headers: myHeaders,
}) })
@ -122,7 +122,7 @@ function myDel(id) {
function lineGet(dir) { function lineGet(dir) {
const myHeaders = new Headers(); const myHeaders = new Headers();
myHeaders.append('Authorization', 'Bearer ' + tok); myHeaders.append('Authorization', 'Bearer ' + tok);
fetch('http://192.168.1.3:7771/'+dir, { fetch('http://192.168.1.3:3000/'+dir, {
method: 'GET', method: 'GET',
headers: myHeaders, headers: myHeaders,
}) })