Skip to content

Instantly share code, notes, and snippets.

@travis
Created January 28, 2014 16:35
Show Gist options
  • Select an option

  • Save travis/8671213 to your computer and use it in GitHub Desktop.

Select an option

Save travis/8671213 to your computer and use it in GitHub Desktop.

Revisions

  1. travis created this gist Jan 28, 2014.
    12 changes: 12 additions & 0 deletions gistfile1.clj
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    (.get "/builds"
    (->
    (fn [request response]
    (go
    (try
    (let [user (<? (fetch (express/current-user)))
    builds (<? (domain/recent-builds user))]
    (.send response 200 (str (map #(parse-object-map % [:id]) builds))))
    (catch :default e
    (log-exception e)
    (.send response 500 "error loading builds")))))
    express/force-login))