     (some-> (sc/fetch-one conn sqlv)
             (usc/normalize-attrs))))
 
-
 ;; Delete Page
 
 (def +delete-page-schema+

  (->> (get-pages-for-user conn user)
       (map decode-page-data)))

(def +page-list-by-project-schema+
  {:user [us/required us/uuid]
   :project [us/required us/uuid]})

(defmethod usc/-query :page/list-by-project
  [conn {:keys [user project] :as params}]
  {:pre [(us/validate! params +page-list-by-project-schema+)]}
  (->> (get-pages-for-user-and-project conn user project)
       (map decode-page-data)))

    (some-> (sc/fetch-one conn sqlv)
            (usc/normalize-attrs))))

(defn get-page-history
  [conn {:keys [id user since max] :as {since (dt/now) max 10}}]
  (let [sql (str "SELECT * FROM pages_history "
                 " WHERE \"user\"=? AND id=?"
                 " AND created_at < ?")
        sqlv [sql user id since]]
    (->> (sc/fetch conn [sql user project])
         (map usc/normalize-attrs))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Service (novelty)
