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