   (:require [ajax.core :refer [GET]]
             [re-frame.core :refer [register-handler, dispatch]]
             [re-frame.utils :as util]
-            [re-frame.middleware :refer [undoable]]))
+            [re-frame.middleware :refer [undoable]]
+            [cljs.reader :refer [read-string, register-tag-parser!]]
+            [dekk.domain :refer [map->Card]]))
 
 
 (register-handler

    (assoc-in app-state [:board-id] board-id)))

(register-handler
  :process-phones-response
  (fn
    ;; store the response of fetching the phones list in the phones attribute of the db
    [app-state [_ response]]
    (assoc-in app-state [:cards] response)))

(register-handler
  :process-phones-bad-response
  (fn
    ;; log a bad response fetching the phones list
    [app-state [_ response]]

  (fn
    ;; Fetch the list of phones and process the response
    [app-state _]
    (util/log "load-cards")
    (GET "cards"
         {:handler         #(dispatch [:process-cards-response %1])
          :error-handler   #(dispatch [:process-cards-bad-response %1])
