# HG changeset patch # User Steve Losh # Date 1317353306 14400 # Node ID 8fce5bbfe1d32688c4620f73e3817486047b84c5 # Parent e22577b16eb52e89ee10e56b54b2497745b56aa3 Watch shows. diff -r e22577b16eb5 -r 8fce5bbfe1d3 src/newseasons/views/main.clj --- a/src/newseasons/views/main.clj Thu Sep 29 23:19:31 2011 -0400 +++ b/src/newseasons/views/main.clj Thu Sep 29 23:28:26 2011 -0400 @@ -26,7 +26,7 @@ (defn unique-by "Turn a sequence of maps into a new sequence with duplicated removed, with uniqueness determined by the given keys. - + Ex: (def a {:foo 1 :bar 1 :baz 1}) @@ -139,8 +139,9 @@ ; Add ------------------------------------------------------------------------- -(defpage [:post "/add"] {:as show} +(defpage [:post "/add"] {:keys [artist-id]} (login-required + (users/user-add-show! (sess/get :email) artist-id) (flash! "Added a show to your list.") (resp/redirect "/")))