   [filter]
   (swap! app-state #(assoc % :filter filter)))
 
-(defn add-task-to!
-  "Add a new task in the card"
-  [card-id task]
+(defn update-card!
+  "Update a card"
+  [card]
   (swap! app-state
-    #(update-in % [:cards card-id :tasks] conj (api/create-task! task false))
+    #(assoc-in % [:cards (:card-id card)] card)
   ))
 
 (defn remove-task-from!

    }))

(def card-list
  "FRP style zoom on the card-list to render"
  (reaction
    (filter-by-title (:filter @app-state) (:cards @app-state))
  ))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(def app-state
  (r/atom
    {:cards {}
