This commit is contained in:
2026-04-02 17:50:10 +08:00
parent 60697d80be
commit ce0aa4f789
373 changed files with 82520 additions and 46 deletions

View File

@@ -1,5 +1,4 @@
// GLOBALS
const $taskForm = document.getElementById('taskForm');
const $toDoList = document.getElementById('toDoList');
const $completedList = document.getElementById('completedList');
@@ -33,16 +32,18 @@ $taskForm.addEventListener("submit", (event) => {
}
});
});
// EXAMPLE API
async function exampleAPI() {
const response = await fetch("http://localhost:3001/test");
const data = await response.text();
console.log(data);
}
// async function exampleAPI() {
// const response = await fetch("http://localhost:3001/test");
// const data = await response.text();
// console.log(data);
// }
//
// exampleAPI();
exampleAPI();
// DISPLAY TASKS
async function displayTasks() {
const response = await fetch("http://localhost:3001/api/tasks")
@@ -166,4 +167,4 @@ function deleteTask(taskId) {
function convertDate(dateString) {
return new Date(dateString).toLocaleDateString("en-AU");
}
}