Skip to content

Commit

Permalink
feat: Added todolist pkg and realm
Browse files Browse the repository at this point in the history
  • Loading branch information
MalekLahbib committed Mar 22, 2024
1 parent 5896691 commit 049a77c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/gno.land/r/demo/todolist/todolist.gno
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ func ToggleTaskStatus(todolistID int, taskID int) string {
}

// Get the task from the todolist
task, ok := tl.(*todolist.TodoList).Tasks.Get(strconv.Itoa(taskID))
if !ok {
task, found := tl.(*todolist.TodoList).Tasks.Get(strconv.Itoa(taskID))
if !found {
return "Task not found"
}

Expand All @@ -78,7 +78,7 @@ func RemoveTask(todolistID int, taskID int) string {
}

// Get the task from the todolist
_, ok := tl.(*todolist.TodoList).Tasks.Get(strconv.Itoa(taskID))
_, ok = tl.(*todolist.TodoList).Tasks.Get(strconv.Itoa(taskID))
if !ok {
return "Task not found"
}
Expand Down

0 comments on commit 049a77c

Please sign in to comment.