removed try catch

This commit is contained in:
ishak jmilou.ishak
2024-12-19 20:05:48 +01:00
parent a6b1c04ea3
commit d8ce5de8f7

View File

@@ -24,13 +24,10 @@ document.querySelectorAll(".btn").forEach((button) => {
// Fetch data from the server
async function fetchData() {
try {
const response = await fetch("/data");
const data = await response.json();
return data;
} catch (error) {
console.error("Error:", error);
}
}
// Parse the data and show it on the website