 
 ;; --- Helpers
 
+(defn- decode-page-options
+  [{:keys [options] :as result}]
+  (let [options (some-> options
+                        (codecs/str->bytes)
+                        (t/decode))]
+    (assoc result :options options)))
+
 (defn- decode-page-data
-  [{:keys [data options] :as result}]
+  [{:keys [data] :as result}]
   (let [data (some-> data
                      (codecs/str->bytes)
-                     (t/decode))
-        options (some-> options
-                        (codecs/str->bytes)
-                        (t/decode))]
-
-    (assoc result :data data :options options)))
+                     (t/decode))]
+    (assoc result :data data)))
 
 (defn get-page-by-id
   [conn id]
   (let [sqlv ["SELECT * FROM pages WHERE id=?" id]]
     (some-> (sc/fetch-one conn sqlv)
             (usc/normalize-attrs)
-            (decode-page-data))))
-
-
+            (decode-page-data)
+            (decode-page-options))))
+
+

                 " ORDER BY created_at ASC")]
    (->> (sc/fetch conn [sql user project])
         (map usc/normalize-attrs)
         (map decode-page-data))))

(defmethod usc/-query :list/pages-by-project
  [conn {:keys [user project] :as params}]

  (delete-page conn params))

;; --- List Pages

;; TODO: consider using transducers

(defn get-pages-for-user
  [conn user]
