dodatki
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user