feat: void errors until proper handling
This commit is contained in:
@@ -9,4 +9,6 @@
|
||||
- [ ] list per URL
|
||||
- [ ] home screen
|
||||
- [ ] change lang
|
||||
- [ ] toasts
|
||||
- [ ] handle errors
|
||||
- [ ] simple view
|
||||
|
||||
@@ -10,28 +10,22 @@ const tasks = ref<Task[]>([]);
|
||||
const list = ref<string>("test");
|
||||
|
||||
function fetchTasks() {
|
||||
getTasks(list.value)
|
||||
void getTasks(list.value)
|
||||
.then((data: Task[]) => {
|
||||
tasks.value = data;
|
||||
setTimeout(fetchTasks, 10000);
|
||||
})
|
||||
.catch(() => {
|
||||
// ignore
|
||||
});
|
||||
}
|
||||
|
||||
function newTask() {
|
||||
if (taskInput.value.trim()) {
|
||||
createTask(list.value, {
|
||||
void createTask(list.value, {
|
||||
name: taskInput.value.trim(),
|
||||
reset_cron: null,
|
||||
})
|
||||
.then((data: Task) => {
|
||||
tasks.value.push(data);
|
||||
})
|
||||
.catch(() => {
|
||||
//ignore
|
||||
})
|
||||
.finally(() => {
|
||||
taskInput.value = "";
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user