naskoap / clojurebook

A picture-gallery application with Clojure
MIT License
0 stars 0 forks source link

Users can now include descriptions with their images #28

Closed naskoap closed 8 years ago

naskoap commented 8 years ago

11

Once entered, descriptions are stored in the database. The following f-n then serves them on the frontend:

(defn descriptions-by-user [userid name]
  (with-db
    sql/with-query-results
    res ["select description from images where userid = ? and name = ?" userid name] (doall res)))

pics_w_descs