From 049a77c584a04e3d03cb7afcac7bb860bc468dc5 Mon Sep 17 00:00:00 2001 From: MalekLahbib Date: Fri, 22 Mar 2024 15:43:02 +0100 Subject: [PATCH] feat: Added todolist pkg and realm --- examples/gno.land/r/demo/todolist/todolist.gno | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/gno.land/r/demo/todolist/todolist.gno b/examples/gno.land/r/demo/todolist/todolist.gno index c772055f51c..1b309d87aca 100644 --- a/examples/gno.land/r/demo/todolist/todolist.gno +++ b/examples/gno.land/r/demo/todolist/todolist.gno @@ -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" } @@ -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" }