This commit is contained in:
2026-05-10 21:46:00 +02:00
parent 6e9efd2dbc
commit 02510fb224
11 changed files with 745 additions and 72 deletions

View File

@@ -5,9 +5,9 @@ function getSpecific(kljuc) {
function getLast() {
const url = `https://ssnj.dcrubro.com/api/vnosi`;
fetch(url, {
method: 'POST',
method: "POST",
headers: {
'Content-Type': 'application/json'
"Content-Type": "application/json"
},
body: JSON.stringify({
query: "*",
@@ -17,7 +17,7 @@ function getLast() {
.then(response => response.json())
.then(data => {
if (!data.success) {
console.error('API Error:', data.message);
console.error("API Error:", data.message);
return;
}
@@ -35,7 +35,7 @@ function getLast() {
}
})
.catch((error) => {
console.error('Error:', error);
console.error("Error:", error);
});
}
@@ -46,9 +46,9 @@ function search() {
const url = `https://ssnj.dcrubro.com/api/vnosi`;
fetch(url, {
method: 'POST',
method: "POST",
headers: {
'Content-Type': 'application/json'
"Content-Type": "application/json"
},
body: JSON.stringify({
query: `*${val}*`, // Potencialno mora biti tukaj en "*" wildcard
@@ -59,7 +59,7 @@ function search() {
.then(response => response.json())
.then(data => {
if (!data.success) {
console.error('API Error:', data.message);
console.error("API Error:", data.message);
return;
}
@@ -89,7 +89,7 @@ function search() {
}
})
.catch((error) => {
console.error('Error:', error);
console.error("Error:", error);
});
}